class twisted.application.service.IService(Interface): (source)
Known implementations: twisted.application.service.Service
Run start-up and shut-down code at the appropriate times.
|Method||setName||Set the name of the service.|
|Method||setServiceParent||Set the parent of the service. This method is responsible for setting the
|Method||disownServiceParent||Use this API to remove an
|Method||startService||Start the service.|
|Method||stopService||Stop the service.|
|Method||privilegedStartService||Do preparation work for starting the service.|
str which is the name of the service or
boolean which indicates whether the service is running.
IServiceCollection which is the parent or
Set the name of the service.
|Parameters||name||Undocumented (type: |
|Raises||RuntimeError||Raised if the service already has a parent.|
Set the parent of the service. This method is responsible for setting the
parent attribute on this service (the child service).
|Parameters||parent||Undocumented (type: |
|Raises||RuntimeError||Raised if the service already has a parent or if the service has a name and the parent already has a child by that name.|
This method is used symmetrically with
setServiceParent in that it sets the
parent attribute on the child.
Start the service.
Do preparation work for starting the service.
Here things which should be done before changing directory, root or shedding privileges are done.