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`.`app`.`ApplicationRunner``

class documentation

`class ApplicationRunner: (source)`

Known subclasses: `twisted.scripts._twistd_unix.UnixApplicationRunner`, `twisted.scripts._twistw.WindowsApplicationRunner`

View In Hierarchy

An object which helps running an application based on a config object.

Subclass me and implement preApplication and postApplication methods. postApplication generally will want to run the reactor after starting the application.

Method | `__init__` | Undocumented
Method | `createOrGetApplication` | Create or load an Application based on the parameters found in the given `ServerOptions` instance.
Method | `postApplication` | Override in subclass.
Method | `preApplication` | Override in subclass.
Method | `run` | Run the application.
Method | `startReactor` | Run the reactor with the given configuration. Subclasses should probably call this from `postApplication`.
Instance Variable | `application` | Available in postApplication, but not preApplication. This is the application object.
Instance Variable | `config` | The config object, which provides a dict-like interface.
Instance Variable | `logger` | Instance provided by `loggerFactory`.
Instance Variable | `loggerFactory` | Factory for creating object responsible for logging.
Instance Variable | `profiler` | Instance provided by `profilerFactory`.
Instance Variable | `profilerFactory` | Factory for creating a profiler object, able to profile the application if options are set accordingly.
Instance Variable | `_exitSignal` | Undocumented

def __init__(self, config): (source)

Undocumented

def createOrGetApplication(self): (source)

Create or load an Application based on the parameters found in the given `ServerOptions` instance.

If a subcommand was used, the `service.IServiceMaker` that it represents will be used to construct a service to be added to a newly-created Application.

Otherwise, an application will be loaded based on parameters in the config.

def postApplication(self): (source)
overridden in `twisted.scripts._twistd_unix.UnixApplicationRunner`, `twisted.scripts._twistw.WindowsApplicationRunner`

Override in subclass.

This will be called after the application has been loaded (so the `application` attribute will be set). Generally this should start the application and run the reactor.

def preApplication(self): (source)
overridden in `twisted.scripts._twistd_unix.UnixApplicationRunner`, `twisted.scripts._twistw.WindowsApplicationRunner`

Override in subclass.

This should set up any state necessary before loading and running the Application.

def run(self): (source)

Run the application.

def startReactor(self, reactor, oldstdout, oldstderr): (source)

Run the reactor with the given configuration. Subclasses should probably call this from `postApplication`.

See Also
`runReactorWithLogging`

application = (source)

Available in postApplication, but not preApplication. This is the application object.

config = (source)

The config object, which provides a dict-like interface.

logger = (source)

Instance provided by `loggerFactory`.

loggerFactory = (source)

Factory for creating object responsible for logging.

profiler = (source)

Instance provided by `profilerFactory`.

profilerFactory = (source)

Factory for creating a profiler object, able to profile the application if options are set accordingly.

_exitSignal = (source)

Undocumented