Package twisted :: Package internet :: Module app :: Class MultiService

[show private | hide private]
[frames | no frames]

## Class MultiService

    _AbstractServiceCollection --+
                                 |
          OriginalAccessor --+   |
                             |   |
                 Versioned --+   |
                             |   |
            ApplicationService --+
                                 |
                                MultiService

Known Subclasses:
  `DependentMultiService`

I am a collection of multiple services.

I am useful if you have a large number of services and need to categorize them, or you need to write a protocol that can access multiple services through one factory, such as a protocol that maps services to virtual hosts, like POP3.

Method Summary
| `__init__(self, serviceName, serviceParent)`
| `__delattr__(self, k)` (inherited from `OriginalAccessor`)
| `__getattr__(self, k)` (inherited from `OriginalAccessor`)
| ``__getstate__`(self, dict)` Get state, adding a version number to it on its way out. (inherited from `Versioned`)
| `__setattr__(self, k, v)` (inherited from `OriginalAccessor`)
| `__setstate__(self, state)` (inherited from `Versioned`)
| ``addService`(self, service)` Add a Service to me.
| ``disownServiceParent`(self)` Have my parent disown me. (inherited from `ApplicationService`)
| `get_application(self)` (inherited from `ApplicationService`)
| ``reallyDel`(self, k)` *actually* del self.k without incurring side-effects. (inherited from `OriginalAccessor`)
| ``reallySet`(self, k, v)` *actually* set self.k to v without incurring side-effects. (inherited from `OriginalAccessor`)
| ``removeService`(self, service)` Remove a Service from me.
| `set_application(self, application)` (inherited from `ApplicationService`)
| `setApplication(self, application)` (inherited from `ApplicationService`)
| ``setServiceParent`(self, serviceParent)` Set my parent, which must be a service collection of some kind. (inherited from `ApplicationService`)
| ``startService`(self)` Start all of my Services.
| ``stopService`(self)` Stop all of my Services.
| `upgradeToVersion1(self)` (inherited from `ApplicationService`)
| ``versionUpgrade`(self)` (internal) Do a version upgrade. (inherited from `Versioned`)

Method Details

### addService(self, service)

Add a Service to me.

### removeService(self, service)

Remove a Service from me.

### startService(self)

Start all of my Services.

### stopService(self)

Stop all of my Services.

I return a Deferred that results in a dict that looks like {serviceObject: (successOrFailure, result)}, where successOrFailure is a boolean and result is the result of the Deferred returned by serviceObject.stopService.

Generated by Epydoc 1.1 on Thu May 8 13:16:27 2003 | http://epydoc.sf.net