2 # **********************************************************************
4 # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
6 # This copy of Ice is licensed to you under the terms described in the
7 # ICE_LICENSE file included in this distribution.
9 # **********************************************************************
11 import sys
, traceback
, Ice
13 Ice
.loadSlice('Callback.ice')
16 class CallbackI(Demo
.Callback
):
17 def initiateCallback(self
, proxy
, current
=None):
18 print "initiating callback to: " + current
.adapter
.getCommunicator().proxyToString(proxy
)
24 def shutdown(self
, current
=None):
25 print "shutting down..."
26 current
.adapter
.getCommunicator().shutdown()
28 class Server(Ice
.Application
):
31 print self
.appName() + ": too many arguments"
34 adapter
= self
.communicator().createObjectAdapter("Callback.Server")
35 adapter
.add(CallbackI(), self
.communicator().stringToIdentity("callback"))
37 self
.communicator().waitForShutdown()
41 sys
.exit(app
.main(sys
.argv
, "config.server"))