summaryrefslogtreecommitdiff
path: root/java/test/Ice/operations/Client.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/Ice/operations/Client.java')
-rw-r--r--java/test/Ice/operations/Client.java66
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);
+ }
+}