1
1
// **********************************************************************
3
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
5
5
// This copy of Ice is licensed to you under the terms described in the
6
6
// ICE_LICENSE file included in this distribution.
8
8
// **********************************************************************
10
package test.Ice.binding;
12
public class Server extends test.Util.Application
13
run(String[] args, Ice.Communicator communicator)
15
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
17
Ice.Communicator communicator = communicator();
16
18
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
17
19
Ice.Identity id = communicator.stringToIdentity("communicator");
18
20
adapter.add(new RemoteCommunicatorI(), id);
19
21
adapter.activate();
21
communicator.waitForShutdown();
26
protected Ice.InitializationData getInitData(Ice.StringSeqHolder argsH)
28
Ice.InitializationData initData = new Ice.InitializationData();
29
initData.properties = Ice.Util.createProperties(argsH);
30
initData.properties.setProperty("Ice.Package.Test", "test.Ice.binding");
31
initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
26
36
main(String[] args)
29
Ice.Communicator communicator = null;
33
communicator = Ice.Util.initialize(args);
34
status = run(args, communicator);
42
if(communicator != null)
46
communicator.destroy();
48
catch(Ice.LocalException ex)
38
Server app = new Server();
39
int result = app.main("Server", args);