diff options
Diffstat (limited to 'java/demo/Ice/async')
-rw-r--r-- | java/demo/Ice/async/Client.java | 2 | ||||
-rw-r--r-- | java/demo/Ice/async/WorkQueue.java | 3 | ||||
-rwxr-xr-x | java/demo/Ice/async/expect.py | 33 |
3 files changed, 34 insertions, 4 deletions
diff --git a/java/demo/Ice/async/Client.java b/java/demo/Ice/async/Client.java index a5a0a513120..4d2a8c37027 100644 --- a/java/demo/Ice/async/Client.java +++ b/java/demo/Ice/async/Client.java @@ -43,7 +43,7 @@ public class Client extends Ice.Application { if(ex instanceof Demo.RequestCanceledException) { - System.out.println("Request canceled"); + System.out.println("Demo.RequestCanceledException"); } else { diff --git a/java/demo/Ice/async/WorkQueue.java b/java/demo/Ice/async/WorkQueue.java index cbe528e77d8..bc18061058a 100644 --- a/java/demo/Ice/async/WorkQueue.java +++ b/java/demo/Ice/async/WorkQueue.java @@ -68,15 +68,12 @@ public class WorkQueue extends Thread // // Throw exception for any outstanding requests. // - - /* java.util.Iterator p = _callbacks.iterator(); while(p.hasNext()) { CallbackEntry entry = (CallbackEntry)p.next(); entry.cb.ice_exception(new RequestCanceledException()); } - */ } public synchronized void diff --git a/java/demo/Ice/async/expect.py b/java/demo/Ice/async/expect.py new file mode 100755 index 00000000000..d73e4621e13 --- /dev/null +++ b/java/demo/Ice/async/expect.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import pexpect, sys, os + +try: + import demoscript +except ImportError: + for toplevel in [".", "..", "../..", "../../..", "../../../.."]: + toplevel = os.path.normpath(toplevel) + if os.path.exists(os.path.join(toplevel, "demoscript")): + break + else: + raise "can't find toplevel directory!" + sys.path.append(os.path.join(toplevel)) + import demoscript + +import demoscript.Util +import demoscript.Ice.async + +server = demoscript.Util.spawn('java Server --Ice.PrintAdapterReady') +server.expect('.* ready') +client = demoscript.Util.spawn('java Client') +client.expect('.*==>') + +demoscript.Ice.async.run(client, server) |