summaryrefslogtreecommitdiff
path: root/java/test/Ice/operations/Server.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-01-21 17:50:46 +0000
committerMark Spruiell <mes@zeroc.com>2002-01-21 17:50:46 +0000
commite287d5554fab7558c9ac76b0568d5dc4450c480d (patch)
tree086733c88fbbff6a7d4196d76365eac23f13ffc4 /java/test/Ice/operations/Server.java
parentSimplify (diff)
downloadice-e287d5554fab7558c9ac76b0568d5dc4450c480d.tar.bz2
ice-e287d5554fab7558c9ac76b0568d5dc4450c480d.tar.xz
ice-e287d5554fab7558c9ac76b0568d5dc4450c480d.zip
adding server; removing wstring
Diffstat (limited to 'java/test/Ice/operations/Server.java')
-rw-r--r--java/test/Ice/operations/Server.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/java/test/Ice/operations/Server.java b/java/test/Ice/operations/Server.java
new file mode 100644
index 00000000000..eaabff5b163
--- /dev/null
+++ b/java/test/Ice/operations/Server.java
@@ -0,0 +1,60 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+public class Server
+{
+ private static int
+ run(String[] args, Ice.Communicator communicator)
+ {
+ String endpts = "default -p 12345 -t 2000";
+ Ice.ObjectAdapter adapter =
+ communicator.createObjectAdapterWithEndpoints("TestAdapter",
+ endpts);
+ Ice.Object object =
+ new MyDerivedClassI(adapter, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.activate();
+ communicator.waitForShutdown();
+ 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);
+ }
+}