twisted.application.service.MultiService(Service) class documentationtwisted.application.service
(View In Hierarchy)
Known subclasses: twisted.mail.mail.MailService, twisted.words.protocols.jabber.component.ServiceManager
Implements interfaces: twisted.application.service.IServiceCollection
Straightforward Service Container.
Hold a collection of services, and manage them in a simplistic way. No service will wait for another, but this object itself will not finish shutting down until all of its child services will finish.
| Method | __init__ | Undocumented | 
| Method | privilegedStartService | Do preparation work for starting the service. | 
| Method | startService | Start the service. | 
| Method | stopService | Stop the service. | 
| Method | getServiceNamed | Get the child service with a given name. | 
| Method | __iter__ | Get an iterator over all child services. | 
| Method | addService | Add a child service. | 
| Method | removeService | Remove a child service. | 
Inherited from Service:
| Method | __getstate__ | Undocumented | 
| 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. | 
Do preparation work for starting the service.
Here things which should be done before changing directory, root or shedding privileges are done.
Get the child service with a given name.
| Returns | (type: IService) | |
| Raises | KeyError | Raised if the service has no child with the given name. | 
Add a child service.
Only implementations of IService.setServiceParent
should use this method.
| Raises | RuntimeError | Raised if the service has a child with the given name. | 
Remove a child service.
Only implementations of IService.disownServiceParent
should use this method.
| 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) | |
| Raises | ValueError | Raised if the given service is not a child. |