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
#include <Ice/Application.h>
11
#include <CallbackI.h>
17
class CallbackServer : public Application
21
virtual int run(int, char*[]);
25
main(int argc, char* argv[])
27
Ice::InitializationData initData;
28
initData.properties = Ice::createProperties(argc, argv);
30
initData.properties->setProperty("Ice.Warn.Connections", "0");
31
initData.properties->setProperty("Ice.Warn.Dispatch", "0");
32
initData.properties->setProperty("Ice.ThreadPool.Server.Serialize", "1");
35
return app.main(argc, argv, initData);
39
CallbackServer::run(int argc, char* argv[])
41
communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", "tcp -p 12010");
42
ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter");
43
adapter->add(new CallbackI(), communicator()->stringToIdentity("c/callback"));
45
communicator()->waitForShutdown();