interface documentation
class IServiceCollection(Interface): (source)
Known implementations: twisted.application.service.MultiService
Collection of services.
Contain several services, and manage their start-up/shut-down. Services can be accessed by name if they have a name, and it is always possible to iterate over them.
Method | __iter__ |
Get an iterator over all child services. |
Method | add |
Add a child service. |
Method | get |
Get the child service with a given name. |
Method | remove |
Remove a child service. |
Add a child service.
Only implementations of IService.setServiceParent
should use this method.
Parameters | |
service:IService | Undocumented |
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.
Parameters | |
service:IService | Undocumented |
Returns | |
Deferred | a Deferred which is triggered when the service has finished shutting down. If shutting down is immediate, a value can be returned (usually, None ). |
Raises | |
ValueError | Raised if the given service is not a child. |