diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-11-16 17:31:10 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-11-16 17:31:10 +0000 |
commit | 51b5c23482df36ac145c82d58e9ccdef9728f935 (patch) | |
tree | 15a62e43b132ebdd721ec13a0d6b664133d00e3a /java/demo/Ice/async/Server.java | |
parent | Remove debug code (diff) | |
download | ice-51b5c23482df36ac145c82d58e9ccdef9728f935.tar.bz2 ice-51b5c23482df36ac145c82d58e9ccdef9728f935.tar.xz ice-51b5c23482df36ac145c82d58e9ccdef9728f935.zip |
Added async demo
Diffstat (limited to 'java/demo/Ice/async/Server.java')
-rw-r--r-- | java/demo/Ice/async/Server.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/java/demo/Ice/async/Server.java b/java/demo/Ice/async/Server.java new file mode 100644 index 00000000000..7ffb20b9a23 --- /dev/null +++ b/java/demo/Ice/async/Server.java @@ -0,0 +1,31 @@ +// ********************************************************************** +// +// 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. +// +// ********************************************************************** + +import Demo.*; + +public class Server extends Ice.Application +{ + public int + run(String[] args) + { + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Queue"); + adapter.add(new QueueI(), communicator().stringToIdentity("queue")); + adapter.activate(); + communicator().waitForShutdown(); + return 0; + } + + public static void + main(String[] args) + { + Server app = new Server(); + int status = app.main("Server", args, "config.server"); + System.exit(status); + } +} |