t.a.a.ApplicationRunner(object) : class documentation

Part of twisted.application.app View Source View In Hierarchy

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

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.
Instance VariablesconfigThe config object, which provides a dict-like interface.
applicationAvailable in postApplication, but not preApplication. This is the application object.
profilerFactoryFactory for creating a profiler object, able to profile the application if options are set accordingly.
profilerInstance provided by profilerFactory.
Method __init__ Undocumented
Method run Run the application.
Method startReactor Run the reactor with the given configuration. Subclasses should probably call this from postApplication.
Method preApplication Override in subclass.
Method startLogging Initialize the logging system.
Method getLogObserver Create a log observer to be added to the logging system before running this application.
Method postApplication Override in subclass.
Method createOrGetApplication Create or load an Application based on the parameters found in the given ServerOptions instance.
def __init__(self, config): (source)
Undocumented
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 AlsorunReactorWithLogging
def preApplication(self): (source)

Override in subclass.

This should set up any state necessary before loading and running the Application.
def startLogging(self, observer): (source)
Initialize the logging system.
ParametersobserverThe observer to add to the logging system.
def getLogObserver(self): (source)
Create a log observer to be added to the logging system before running this application.
def postApplication(self): (source)

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 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.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.