diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-01-17 23:43:31 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-01-17 23:43:31 +0000 |
commit | 90c06dddc5b3184284cb5b54f3e352abaf0aefee (patch) | |
tree | 685a512c82c367f79e1878a7231304fc5f482f8e /java/test/Ice/inheritance/Server.java | |
parent | fixes (diff) | |
download | ice-90c06dddc5b3184284cb5b54f3e352abaf0aefee.tar.bz2 ice-90c06dddc5b3184284cb5b54f3e352abaf0aefee.tar.xz ice-90c06dddc5b3184284cb5b54f3e352abaf0aefee.zip |
adding server
Diffstat (limited to 'java/test/Ice/inheritance/Server.java')
-rw-r--r-- | java/test/Ice/inheritance/Server.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/java/test/Ice/inheritance/Server.java b/java/test/Ice/inheritance/Server.java new file mode 100644 index 00000000000..4e89f84d931 --- /dev/null +++ b/java/test/Ice/inheritance/Server.java @@ -0,0 +1,59 @@ +// ********************************************************************** +// +// 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 InitialI(adapter); + adapter.add(object, Ice.Util.stringToIdentity("initial")); + 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); + } +} |