summaryrefslogtreecommitdiff
path: root/py/demo/Glacier2/callback/Server.py
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
committerMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
commit9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch)
tree5016567c58c81f5654e9d01935e199c6bf4761d2 /py/demo/Glacier2/callback/Server.py
parentVS add-in & build updates: (diff)
downloadice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'py/demo/Glacier2/callback/Server.py')
-rwxr-xr-xpy/demo/Glacier2/callback/Server.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/py/demo/Glacier2/callback/Server.py b/py/demo/Glacier2/callback/Server.py
deleted file mode 100755
index 17ddc7719fc..00000000000
--- a/py/demo/Glacier2/callback/Server.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2015 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 sys, traceback, Ice
-
-Ice.loadSlice('Callback.ice')
-import Demo
-
-class CallbackI(Demo.Callback):
- def initiateCallback(self, proxy, current=None):
- print("initiating callback to: " + current.adapter.getCommunicator().proxyToString(proxy))
- try:
- proxy.callback()
- except:
- traceback.print_exc()
-
- def shutdown(self, current=None):
- print("shutting down...")
- current.adapter.getCommunicator().shutdown()
-
-class Server(Ice.Application):
- def run(self, args):
- if len(args) > 1:
- print(self.appName() + ": too many arguments")
- return 1
-
- adapter = self.communicator().createObjectAdapter("Callback.Server")
- adapter.add(CallbackI(), self.communicator().stringToIdentity("callback"))
- adapter.activate()
- self.communicator().waitForShutdown()
- return 0
-
-app = Server()
-sys.exit(app.main(sys.argv, "config.server"))