summaryrefslogtreecommitdiff
path: root/java/demo/IceGrid/icebox/HelloServiceI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo/IceGrid/icebox/HelloServiceI.java')
-rw-r--r--java/demo/IceGrid/icebox/HelloServiceI.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/java/demo/IceGrid/icebox/HelloServiceI.java b/java/demo/IceGrid/icebox/HelloServiceI.java
new file mode 100644
index 00000000000..5e4f933401c
--- /dev/null
+++ b/java/demo/IceGrid/icebox/HelloServiceI.java
@@ -0,0 +1,29 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 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 HelloServiceI implements IceBox.Service
+{
+ public void
+ start(String name, Ice.Communicator communicator, String[] args)
+ {
+ _adapter = communicator.createObjectAdapter("Hello-" + name);
+
+ String helloIdentity = communicator.getProperties().getProperty("Hello.Identity");
+ _adapter.add(new HelloI(name), communicator.stringToIdentity(helloIdentity));
+ _adapter.activate();
+ }
+
+ public void
+ stop()
+ {
+ _adapter.destroy();
+ }
+
+ private Ice.ObjectAdapter _adapter;
+}