1 // **********************************************************************
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
8 // **********************************************************************
10 package test
.Glacier2
.router
;
12 public class Server
extends test
.Util
.Application
17 communicator().getProperties().setProperty("CallbackAdapter.Endpoints", "tcp -p 12010");
18 Ice
.ObjectAdapter adapter
= communicator().createObjectAdapter("CallbackAdapter");
19 adapter
.add(new CallbackI(),
20 communicator().stringToIdentity("c1/callback")); // The test allows "c1" as category.
21 adapter
.add(new CallbackI(),
22 communicator().stringToIdentity("c2/callback")); // The test allows "c2" as category.
23 adapter
.add(new CallbackI(),
24 communicator().stringToIdentity("c3/callback")); // The test rejects "c3" as category.
25 adapter
.add(new CallbackI(),
26 communicator().stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
28 communicator().waitForShutdown();
33 protected Ice
.InitializationData
getInitData(Ice
.StringSeqHolder argsH
)
35 Ice
.InitializationData initData
= new Ice
.InitializationData();
36 initData
.properties
= Ice
.Util
.createProperties(argsH
);
37 initData
.properties
.setProperty("Ice.Package.Test", "test.Glacier2.router");
45 Server c
= new Server();
46 int status
= c
.main("Server", args
);