diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-22 11:19:30 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-22 11:19:30 -0230 |
commit | 4db3e73ce821b142d0f139e30bf81a13db92ed95 (patch) | |
tree | 7742182c3816cd40b99f5b77d9d48a39c9b9953c /java/demo/Ice/plugin/Client.java | |
parent | Bug 3912 - fixed windows build for new plugin demo (diff) | |
download | ice-4db3e73ce821b142d0f139e30bf81a13db92ed95.tar.bz2 ice-4db3e73ce821b142d0f139e30bf81a13db92ed95.tar.xz ice-4db3e73ce821b142d0f139e30bf81a13db92ed95.zip |
Bug 3912 - added regular plugin to plugin demo
Diffstat (limited to 'java/demo/Ice/plugin/Client.java')
-rw-r--r-- | java/demo/Ice/plugin/Client.java | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/java/demo/Ice/plugin/Client.java b/java/demo/Ice/plugin/Client.java index a0a2f4f2f10..f1d8c0ec7aa 100644 --- a/java/demo/Ice/plugin/Client.java +++ b/java/demo/Ice/plugin/Client.java @@ -32,12 +32,7 @@ public class Client extends Ice.Application { System.out.println( "usage:\n" + - "t: send greeting as twoway\n" + - "o: send greeting as oneway\n" + - "O: send greeting as batch oneway\n" + - "d: send greeting as datagram\n" + - "D: send greeting as batch datagram\n" + - "f: flush all batch requests\n" + + "t: send greeting\n" + "s: shutdown server\n" + "x: exit\n" + "?: help\n"); @@ -59,17 +54,12 @@ public class Client extends Ice.Application // setInterruptHook(new ShutdownHook()); - HelloPrx twoway = HelloPrxHelper.checkedCast(communicator().propertyToProxy("Hello.Proxy")); - if(twoway == null) + HelloPrx hello = HelloPrxHelper.checkedCast(communicator().propertyToProxy("Hello.Proxy")); + if(hello == null) { System.err.println("invalid proxy"); return 1; } - HelloPrx oneway = (HelloPrx)twoway.ice_oneway(); - HelloPrx batchOneway = (HelloPrx)twoway.ice_batchOneway(); - HelloPrx datagram = (HelloPrx)twoway.ice_datagram(); - HelloPrx batchDatagram = (HelloPrx)twoway.ice_batchDatagram(); - menu(); java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in)); @@ -88,31 +78,11 @@ public class Client extends Ice.Application } if(line.equals("t")) { - twoway.sayHello(); - } - else if(line.equals("o")) - { - oneway.sayHello(); - } - else if(line.equals("O")) - { - batchOneway.sayHello(); - } - else if(line.equals("d")) - { - datagram.sayHello(); - } - else if(line.equals("D")) - { - batchDatagram.sayHello(); - } - else if(line.equals("f")) - { - communicator().flushBatchRequests(); + hello.sayHello(); } else if(line.equals("s")) { - twoway.shutdown(); + hello.shutdown(); } else if(line.equals("x")) { |