Service¶
-
class
Cauldron.base.dispatcher.
Service
[source] [edit on github]¶ Bases:
Cauldron.base.core._BaseService
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
name
Methods 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. setupOrphans
()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¶
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.
-
setupOrphans
()[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
-