ICE 3.4.2
[php5-ice-freebsdport.git] / java / demo / Ice / value / Server.java
blob5441d551af4b8906e6f18bb2cbbad1c1b46ab9b6
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 public class Server extends Ice.Application
12 public int
13 run(String[] args)
15 if(args.length > 0)
17 System.err.println(appName() + ": too many arguments");
18 return 1;
21 Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Value");
22 Ice.Object object = new InitialI(adapter);
23 adapter.add(object, communicator().stringToIdentity("initial"));
24 adapter.activate();
25 communicator().waitForShutdown();
26 return 0;
29 public static void
30 main(String[] args)
32 Server app = new Server();
33 int status = app.main("Server", args, "config.server");
34 System.exit(status);