twisted.application.service.IService(Interface) interface documentationtwisted.application.service
(View In Hierarchy)
Known implementations: twisted.application.service.Service, twisted.application.test.test_service.AlmostService
A service.
Run start-up and shut-down code at the appropriate times.
| Attribute | name | A strwhich is the name of the service orNone. | 
| Attribute | running | A booleanwhich indicates whether the service is 
running. | 
| Attribute | parent | An IServiceCollectionwhich is the parent orNone. | 
| Method | setName | Set the name of the service. | 
| Method | setServiceParent | Set the parent of the service.  This method is responsible for setting 
the parentattribute on this service (the child service). | 
| Method | disownServiceParent | Use this API to remove an IServicefrom anIServiceCollection. | 
| Method | startService | Start the service. | 
| Method | stopService | Stop the service. | 
| Method | privilegedStartService | Do preparation work for starting the service. | 
Set the name of the service.
| 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).
| 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. | 
Use this API to remove an IService 
from an IServiceCollection.
This method is used symmetrically with setServiceParent
in that it sets the parent attribute on the child.
| Returns | a Deferredwhich is triggered when the service has finished shutting down. If shutting
down is immediate, a value can be returned (usually,None). (type:Deferred) | |