Service¶
-
class
Cauldron.base.dispatcher.Service[source] [edit on github]¶ Bases:
Cauldron.base.core._BaseServiceA dispatcher is a KTL service server-side.
A class encapsulating a basic representation of a complete KTL service. The
nameargument is case sensitive, and will be used to locate (and load) the service’s KTLXML representation. Theconfigargument specifies the stdiosvc configuration file that will be used when loading the stdiosvc front-end. Thesetupfunction will be called to properly instantiate all keywords associated with thisServiceinstance; it accepts aServiceinstance as its sole argument, and should instantiateKeyword.Basicobjects directly. If any keywords are not instantiated, they will be given placeholder “cacheing”Keyword.Basicinstances of the appropriate type (string, integer, etc.). SeesetupKeywords()for an example. Ifdispatcheris 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
namexmlMethods Summary
begin()Send any queued messages. broadcast()Called to broadcast all values to ensure that the keyword server matches the keyword. get(name[, default])Get a keyword. keywords()The list of available keywords setStatusKeyword(keyword)Set the status keyword value. setupKeywords()Set up orphaned keywords, that is keywords which aren’t attached to a specific keyword class. shutdown()Shutdown this keyword server. Attributes Documentation
-
name= None¶
-
xml= None¶
Methods Documentation
-
begin()[source] [edit on github]¶ Send any queued messages.
-
broadcast()[source] [edit on github]¶ Called to broadcast all values to ensure that the keyword server matches the keyword.
-
get(name, default=None)[source] [edit on github]¶ Get a keyword.
-
keywords()[source] [edit on github]¶ The list of available keywords
-
setStatusKeyword(keyword)[source] [edit on github]¶ Set the status keyword value.
-
setupKeywords()[source] [edit on github]¶ Set up orphaned keywords, that is keywords which aren’t attached to a specific keyword class.
-
shutdown()[source] [edit on github]¶ Shutdown this keyword server.
This is an abstract method. Backends must implement this method
-