Service¶
-
class
Cauldron.zmq.dispatcher.
Service
[source] [edit on github]¶ Bases:
Cauldron.base.dispatcher.Service
A dispatcher is a KTL service server-side.
A class encapsulating a basic representation of a complete KTL service. The
name
argument is case sensitive, and will be used to locate (and load) the service’s KTLXML representation. Theconfig
argument specifies the stdiosvc configuration file that will be used when loading the stdiosvc front-end. Thesetup
function will be called to properly instantiate all keywords associated with thisService
instance; it accepts aService
instance as its sole argument, and should instantiateKeyword.Basic
objects directly. If any keywords are not instantiated, they will be given placeholder “cacheing”Keyword.Basic
instances of the appropriate type (string, integer, etc.). SeesetupOrphans()
for an example. Ifdispatcher
is specified, only keywords corresponding to that dispatcher number will be instantiated.Parameters: name : str
the Service name.
config : str
the stdiosvc configuration filename, or the Cauldron configuration filename.
setup : callable
a function which will be called to set up the keywords for this service.
dispatcher : str, optional
The name of the dispatcher to use for this service. If not provided, all keywords will be used.
Attributes Summary
socket
A thread-local ZMQ socket for sending commands to the responder thread. Methods Summary
shutdown
()Shutdown this keyword server. Attributes Documentation
-
socket
¶ A thread-local ZMQ socket for sending commands to the responder thread.
Methods Documentation
-
shutdown
()[source] [edit on github]¶ Shutdown this keyword server.
This is an abstract method. Backends must implement this method
-