summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/async/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/async/Server.cpp')
-rw-r--r--cpp/demo/Ice/async/Server.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/cpp/demo/Ice/async/Server.cpp b/cpp/demo/Ice/async/Server.cpp
new file mode 100644
index 00000000000..bc4ecadf287
--- /dev/null
+++ b/cpp/demo/Ice/async/Server.cpp
@@ -0,0 +1,40 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <QueueI.h>
+#include <Ice/Application.h>
+
+using namespace std;
+
+class QueueServer : public Ice::Application
+{
+public:
+
+ virtual int run(int, char*[]);
+};
+
+int
+main(int argc, char* argv[])
+{
+ QueueServer app;
+ return app.main(argc, argv, "config.server");
+}
+
+int
+QueueServer::run(int argc, char* argv[])
+{
+ Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Queue");
+ adapter->add(new QueueI, communicator()->stringToIdentity("queue"));
+ adapter->activate();
+
+ shutdownOnInterrupt();
+ communicator()->waitForShutdown();
+
+ return EXIT_SUCCESS;
+}