t.a.s.IService(Interface) : interface documentation

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

Known implementations: twisted.application.service.Service

A service.

Run start-up and shut-down code at the appropriate times.
Instance VariablesnameThe name of the service (or None) (type: string )
runningWhether the service is running. (type: boolean )
Method setName Set the name of the service.
Method setServiceParent Set the parent of the service.
Method disownServiceParent Use this API to remove an IService from an IServiceCollection.
Method startService Start the service.
Method stopService Stop the service.
Method privilegedStartService Do preparation work for starting the service.
def setName(name): (source)
Set the name of the service.
Parametersname (type: str )
RaisesRuntimeErrorRaised if the service already has a parent.
def setServiceParent(parent): (source)
Set the parent of the service.
Parametersparent (type: IServiceCollection )
RaisesRuntimeErrorRaised if the service already has a parent or if the service has a name and the parent already has a child by that name.
def disownServiceParent(): (source)

Use this API to remove an IService from an IServiceCollection.

This method is used symmetrically with setServiceParent in that it sets the parent attribute on the child.
Returnsa Deferred which is triggered when the service has finished shutting down. If shutting down is immediate, a value can be returned (usually, None). (type: Deferred )
def startService(): (source)
Start the service.
def stopService(): (source)
Stop the service.
Returnsa Deferred which is triggered when the service has finished shutting down. If shutting down is immediate, a value can be returned (usually, None). (type: Deferred )
def privilegedStartService(): (source)

Do preparation work for starting the service.

Here things which should be done before changing directory, root or shedding privileges are done.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.