Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`application`.`service`.`IServiceCollection``

interface documentation

`class IServiceCollection(Interface): (source)`

Known implementations: `twisted.application.service.MultiService`

View In Hierarchy

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 | `addService` | Add a child service.
Method | `getServiceNamed` | Get the child service with a given name.
Method | `removeService` | Remove a child service.

def __iter__(): (source)

Get an iterator over all child services.

def addService(service): (source)

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.

def getServiceNamed(name): (source)

Get the child service with a given name.

Parameters
name:`str` | Undocumented
Returns
`IService` | Undocumented
Raises
`KeyError` | Raised if the service has no child with the given name.

def removeService(service): (source)

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.