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`.`xish`.`xmlstream`.`BootstrapMixin``

class documentation

`class BootstrapMixin: (source)`

Known subclasses: `twisted.words.protocols.jabber.xmlstream.XmlStreamServerFactory`, `twisted.words.xish.xmlstream.XmlStreamFactoryMixin`

View In Hierarchy

XmlStream factory mixin to install bootstrap event observers.

This mixin is for factories providing `IProtocolFactory` to make sure bootstrap event observers are set up on protocols, before incoming data is processed. Such protocols typically derive from `utility.EventDispatcher`, like `XmlStream`.

You can set up bootstrap event observers using `addBootstrap`. The `event` and `fn` parameters correspond with the `event` and `observerfn` arguments to `utility.EventDispatcher.addObserver`.

Present Since
8.2.

Method | `__init__` | Undocumented
Method | `addBootstrap` | Add a bootstrap event handler.
Method | `installBootstraps` | Install registered bootstrap observers.
Method | `removeBootstrap` | Remove a bootstrap event handler.
Instance Variable | `bootstraps` | The list of registered bootstrap event observers.

def __init__(self): (source)
overridden in `twisted.words.protocols.jabber.xmlstream.XmlStreamServerFactory`, `twisted.words.xish.xmlstream.XmlStreamFactoryMixin`

Undocumented

def addBootstrap(self, event, fn): (source)

Add a bootstrap event handler.

Parameters
event:`str` or `xpath.XPathQuery` | The event to register an observer for.
fn | The observer callable to be registered.

def installBootstraps(self, dispatcher): (source)

Install registered bootstrap observers.

Parameters
dispatcher:`utility.EventDispatcher` | Event dispatcher to add the observers to.

def removeBootstrap(self, event, fn): (source)

Remove a bootstrap event handler.

Parameters
event:`str` or `xpath.XPathQuery` | The event the observer is registered for.
fn | The registered observer callable.

bootstraps: `list` = (source)

The list of registered bootstrap event observers.