Package twisted :: Package internet :: Module defer :: Class DeferredList

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

## Class DeferredList

    Deferred --+
               |
              DeferredList

I combine a group of deferreds into one callback.

I track a list of `Deferred`s for their callbacks, and make a single callback when they have all completed, a list of (success, result) tuples, 'success' being a boolean.

Note that you can still use a `Deferred` after putting it in a DeferredList. In particular, if you want to suppress 'Unhandled error in Deferred' messages, you will still need to add errbacks to the Deferreds *after* putting them in the DeferredList, as a DeferredList won't swallow the errors.

Method Summary
| ``__init__`(self, deferredList, fireOnOneCallback, fireOnOneErrback)` Initialize a DeferredList.
| ``__del__`(self)` Print tracebacks and die. (inherited from `Deferred`)
| `__repr__(self)` (inherited from `Deferred`)
| `__str__(self)` (inherited from `Deferred`)
| ``addBoth`(self, callback, *args, **kw)` Convenience method for adding a single callable as both a callback and an errback. (inherited from `Deferred`)
| ``addCallback`(self, callback, *args, **kw)` Convenience method for adding just a callback. (inherited from `Deferred`)
| ``addCallbacks`(self, callback, errback, callbackArgs, callbackKeywords, errbackArgs, errbackKeywords, asDefaults)` Add a pair of callbacks (success and error) to this Deferred. (inherited from `Deferred`)
| `addDeferred(self, deferred)`
| ``addErrback`(self, errback, *args, **kw)` Convenience method for adding just an errback. (inherited from `Deferred`)
| ``arm`(self)` This method is deprecated. (inherited from `Deferred`)
| ``armAndCallback`(self, result)` Run all success callbacks that have been added to this Deferred. (inherited from `Deferred`)
| ``armAndChain`(self, d)` Chain another Deferred to this Deferred. (inherited from `Deferred`)
| ``armAndErrback`(self, fail)` Run all error callbacks that have been added to this Deferred. (inherited from `Deferred`)
| ``callback`(self, result)` Run all success callbacks that have been added to this Deferred. (inherited from `Deferred`)
| ``chainDeferred`(self, d)` Chain another Deferred to this Deferred. (inherited from `Deferred`)
| ``errback`(self, fail)` Run all error callbacks that have been added to this Deferred. (inherited from `Deferred`)
| ``pause`(self)` Stop processing on a Deferred until `unpause`() is called. (inherited from `Deferred`)
| ``setTimeout`(self, seconds, timeoutFunc)` Set a timeout function to be triggered if I am not called. (inherited from `Deferred`)
| ``unpause`(self)` Process all callbacks made since `pause`() was called. (inherited from `Deferred`)

Class Variable Summary
`int` | `fireOnOneCallback`
`int` | `fireOnOneErrback`

Method Details

### __init__(self, deferredList, fireOnOneCallback=0, fireOnOneErrback=0)
(Constructor)

Initialize a DeferredList.

  Parameters:
    `deferredList` - The list of deferreds to track.
    (type=`list` of `Deferred`s)
    `fireOnOneCallback` - (keyword param) a flag indicating that only one callback needs to be fired for me to call my callback
    `fireOnOneErrback` - (keyword param) a flag indicating that only one errback needs to be fired for me to call my errback

Class Variable Details

### fireOnOneCallback

  Type:
    `int`
  Value:

        0

### fireOnOneErrback

  Type:
    `int`
  Value:

        0

Generated by Epydoc 1.1 on Sat Feb 15 21:17:51 2003 | http://epydoc.sf.net