summaryrefslogtreecommitdiff
path: root/java/demo/IceGrid/simple/Server.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-09-22 12:53:39 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-09-22 12:53:39 +0000
commitbfdd9834dafd44a84753591220657ca1cc6a3098 (patch)
treebc982ee6aa3611d9143c6056156b2b007093d946 /java/demo/IceGrid/simple/Server.java
parentAdded include of <sys/loadavg.h> for Sun (diff)
downloadice-bfdd9834dafd44a84753591220657ca1cc6a3098.tar.bz2
ice-bfdd9834dafd44a84753591220657ca1cc6a3098.tar.xz
ice-bfdd9834dafd44a84753591220657ca1cc6a3098.zip
Added IceGrid demo.
Diffstat (limited to 'java/demo/IceGrid/simple/Server.java')
-rw-r--r--java/demo/IceGrid/simple/Server.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/java/demo/IceGrid/simple/Server.java b/java/demo/IceGrid/simple/Server.java
new file mode 100644
index 00000000000..0c161a5c180
--- /dev/null
+++ b/java/demo/IceGrid/simple/Server.java
@@ -0,0 +1,31 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+public class Server extends Ice.Application
+{
+ public int
+ run(String[] args)
+ {
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
+ String id = communicator().getProperties().getProperty("Identity");
+
+ adapter.add(new HelloI(), Ice.Util.stringToIdentity(id));
+ adapter.activate();
+ communicator().waitForShutdown();
+ return 0;
+ }
+
+ static public void
+ main(String[] args)
+ {
+ Server app = new Server();
+ int status = app.main("Server", args);
+ System.exit(status);
+ }
+}