From 095ce5674bfa3c48b0cabbc2e37a10c0433a46aa Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Thu, 13 Dec 2007 14:49:32 -0330 Subject: Added multicast demo --- java/demo/Ice/multicast/Server.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 java/demo/Ice/multicast/Server.java (limited to 'java/demo/Ice/multicast/Server.java') diff --git a/java/demo/Ice/multicast/Server.java b/java/demo/Ice/multicast/Server.java new file mode 100644 index 00000000000..06f6576471c --- /dev/null +++ b/java/demo/Ice/multicast/Server.java @@ -0,0 +1,37 @@ +// ********************************************************************** +// +// 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. +// +// ********************************************************************** + +import Demo.*; + +public class Server extends Ice.Application +{ + public int + run(String[] args) + { + if(args.length > 0) + { + System.err.println(appName() + ": too many arguments"); + return 1; + } + + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello"); + adapter.add(new HelloI(), communicator().stringToIdentity("hello")); + adapter.activate(); + communicator().waitForShutdown(); + return 0; + } + + public static void + main(String[] args) + { + Server app = new Server(); + int status = app.main("Server", args, "config.server"); + System.exit(status); + } +} -- cgit v1.2.3