ICE 3.4.2
[php5-ice-freebsdport.git] / java / test / Ice / adapterDeactivation / Server.java
blobde9be49c88b41c0915848730bcd12e021cb6800c
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 package test.Ice.adapterDeactivation;
12 public class Server extends test.Util.Application
14 public int
15 run(String[] args)
17 Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
18 Ice.ServantLocator locator = new ServantLocatorI();
20 adapter.addServantLocator(locator, "");
21 adapter.activate();
22 serverReady();
23 adapter.waitForDeactivate();
24 return 0;
27 protected Ice.InitializationData getInitData(Ice.StringSeqHolder argsH)
29 Ice.InitializationData initData = new Ice.InitializationData();
30 initData.properties = Ice.Util.createProperties(argsH);
31 initData.properties.setProperty("Ice.Package.Test", "test.Ice.adapterDeactivation");
32 initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
33 return initData;
36 public static void
37 main(String[] args)
39 Server app = new Server();
40 int result = app.main("Server", args);
42 System.gc();
43 System.exit(result);