Package twisted :: Package application :: Module service :: Class IService
[frames | no frames]

Class IService

Interface --+
            |
           IService


A service.

Run start-up and shut-down code at the appropriate times.
Method Summary
Deferred disownServiceParent(self)
Remove the parent of the service.
  privilegedStartService(self)
Do preparation work for starting the service.
  setName(self, name)
Set the name of the service.
  setServiceParent(self, parent)
Set the parent of the service.
  startService(self)
Start the the service.
Deferred stopService(self)
Stop the the service.

Instance Variable Summary
string name: The name of the service (or None)
boolean running: Whether the service is running.

Method Details

disownServiceParent(self)

Remove the parent of the service.
Returns:
a 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)

privilegedStartService(self)

Do preparation work for starting the service.

Here things which should be done before changing directory, root or shedding privileges are done.

setName(self, name)

Set the name of the service.
Parameters:
name
           (type=str @raise RuntimeError: Raised if the service already has a parent.)

setServiceParent(self, parent)

Set the parent of the service.

startService(self)

Start the the service.

stopService(self)

Stop the the service.
Returns:
a 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)

Instance Variable Details

name

The name of the service (or None)
Type:
string

running

Whether the service is running.
Type:
boolean

Generated by Epydoc 2.0 on Sat May 15 20:07:53 2004 http://epydoc.sf.net