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`.`words`.`protocols`.`jabber`.`component`.`Service``

class documentation

`class Service(service.Service): (source)`

Implements interfaces: `twisted.words.protocols.jabber.ijabber.IService`

View In Hierarchy

External server-side component service.

Method | `componentConnected` | Parent component has established a connection.
Method | `componentDisconnected` | Parent component has lost the connection to the Jabber server.
Method | `send` | Send data over service parent's XML stream.
Method | `transportConnected` | Parent component has established a connection over the underlying transport.

Inherited from `Service`:

Method | `__getstate__` | Undocumented
Method | `disownServiceParent` | Use this API to remove an `IService` from an `IServiceCollection`.
Method | `privilegedStartService` | Do preparation work for starting the service.
Method | `setName` | Set the name of the service.
Method | `setServiceParent` | Set the parent of the service. This method is responsible for setting the `parent` attribute on this service (the child service).
Method | `startService` | Start the service.
Method | `stopService` | Stop the service.
Instance Variable | `name` | A `str` which is the name of the service or `None`.
Instance Variable | `parent` | An `IServiceCollection` which is the parent or `None`.
Instance Variable | `running` | A `boolean` which indicates whether the service is running.

def componentConnected(self, xs): (source)
from `twisted.words.protocols.jabber.ijabber.IService`

Parent component has established a connection.

At this point, authentication was successful, and XML stanzas can be exchanged over the XML stream `xs`. This method can be used to setup observers for incoming stanzas.

Parameters
xs:`xmlstream.XmlStream` | XML Stream that represents the established connection.

def componentDisconnected(self): (source)
from `twisted.words.protocols.jabber.ijabber.IService`

Parent component has lost the connection to the Jabber server.

Subsequent use of `self.parent.send` will result in data being queued until a new connection has been established.

def send(self, obj): (source)

Send data over service parent's XML stream.

Parameters
obj | data to be sent over the XML stream. This is usually an object providing `domish.IElement`, or serialized XML. See `xmlstream.XmlStream` for details.
Note
`ServiceManager` maintains a queue for data sent using this method when there is no current established XML stream. This data is then sent as soon as a new stream has been established and initialized. Subsequently, `componentConnected` will be called again. If this queueing is not desired, use `send` on the XmlStream object (passed to `componentConnected`) directly.

def transportConnected(self, xs): (source)
from `twisted.words.protocols.jabber.ijabber.IService`

Parent component has established a connection over the underlying transport.

At this point, no traffic has been exchanged over the XML stream. This method can be used to change properties of the XML Stream (in `xs`), the service manager or it's authenticator prior to stream initialization (including authentication).