t.a.s.Service : class documentation

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

Known subclasses: twisted.application.internet._VolatileDataService, twisted.application.internet.CooperatorService, twisted.application.service.MultiService, twisted.manhole.service.Service, twisted.names.secondary.SecondaryAuthorityService, twisted.runner.procmon.ProcessMonitor, twisted.words.protocols.jabber.component.Service

Implements interfaces: twisted.application.service.IService

Base class for services

Most services should inherit from this class. It handles the book-keeping reponsibilities of starting and stopping, as well as not serializing this book-keeping information.
Method __getstate__ Undocumented
Method setName Set the name of the service.
Method setServiceParent Set the parent of the service.
Method disownServiceParent Remove the parent of the service.
Method privilegedStartService Do preparation work for starting the service.
Method startService Start the service.
Method stopService Stop the service.
def __getstate__(self): (source)
Undocumented
def setName(self, name): (source)
Set the name of the service.
Parametersname (type: str )
RaisesRuntimeErrorRaised if the service already has a parent.
def setServiceParent(self, parent): (source)
Set the parent of the service.
Parametersname (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(self): (source)
Remove the parent of 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(self): (source)

Do preparation work for starting the service.

Here things which should be done before changing directory, root or shedding privileges are done.
def startService(self): (source)
Start the service.
def stopService(self): (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 )
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.