Package omero :: Package util :: Class Server
[hide private]
[frames] | no frames]

Class Server

source code


Basic server implementation which can be used for implementing a standalone python server which can be started from icegridnode.

The servant implementation MUST have a constructor which takes a single ServerContext argument AND have a cleanup() method

Logging is configured relative to the current directory to be in var/log by default.

Usage:

   if __name__ == "__main__":
       app=Server(ServicesI, "ServicesAdapter", Ice.Identity("Services",""))
       sys.exit(app.main(sys.argv))

app.impl now points to an instance of ServicesI

Instance Methods [hide private]
 
__init__(self, impl_class, adapter_name, identity, logdir=LOGDIR)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
run(self, args) source code
 
cleanup(self)
Cleans up all resources that were created by this server.
source code

Inherited from Ice.Application: interruptCallback, main

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from Ice.Application: appName, callbackOnInterrupt, callbackOnInterruptCallback, communicator, destroyOnInterrupt, destroyOnInterruptCallback, holdInterrupt, holdInterruptCallback, ignoreInterrupt, interrupted, releaseInterrupt, shutdownOnInterrupt, shutdownOnInterruptCallback

Class Variables [hide private]

Inherited from Ice.Application: HandleSignals, NoSignalHandling

Inherited from Ice.Application (private): _appName, _application, _callbackInProgress, _communicator, _condVar, _ctrlCHandler, _destroyed, _interrupted, _previousCallback, _released, _signalPolicy

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, impl_class, adapter_name, identity, logdir=LOGDIR)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

run(self, args)

source code 
Overrides: Ice.Application.run

cleanup(self)

source code 

Cleans up all resources that were created by this server. Primarily the one servant instance.