diff options
author | Mark Spruiell <mes@zeroc.com> | 2001-12-12 23:58:31 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2001-12-12 23:58:31 +0000 |
commit | 0202b93b703d77b027c39f36658a30187420f684 (patch) | |
tree | 66eab33c1b61abf98fa075b35d28c6820b12b136 /java/test/Ice/operations/Client.java | |
parent | initial check-in (diff) | |
download | ice-0202b93b703d77b027c39f36658a30187420f684.tar.bz2 ice-0202b93b703d77b027c39f36658a30187420f684.tar.xz ice-0202b93b703d77b027c39f36658a30187420f684.zip |
initial check-in
Diffstat (limited to 'java/test/Ice/operations/Client.java')
-rw-r--r-- | java/test/Ice/operations/Client.java | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/java/test/Ice/operations/Client.java b/java/test/Ice/operations/Client.java new file mode 100644 index 00000000000..54c97bc7b1a --- /dev/null +++ b/java/test/Ice/operations/Client.java @@ -0,0 +1,66 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +public class Client +{ + private static int + run(String[] args, Ice.Communicator communicator) + { + Test.MyClassPrx myClass = AllTests.allTests(communicator); + + System.out.print("testing server shutdown... "); + System.out.flush(); + myClass.shutdown(); + try + { + myClass.opVoid(); + throw new RuntimeException(); + } + catch (Ice.ConnectFailedException ex) + { + System.out.println("ok"); + } + + return 0; + } + + public static void + main(String[] args) + { + int status = 0; + Ice.Communicator communicator = null; + + try + { + communicator = Ice.Util.initialize(args); + status = run(args, communicator); + } + catch (Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + + if (communicator != null) + { + try + { + communicator.destroy(); + } + catch (Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + } + + System.exit(status); + } +} |