twisted.flow.controller.Deferred

Package twisted :: Package flow :: Module controller :: Class Deferred |
[frames | no frames]

## Class Deferred

    Controller --+
                 |
      Deferred --+
                 |
                Deferred

    wraps up a Stage with a Deferred interface

    In this version, the results of the Stage are used to
    construct a list of results and then sent to deferred.  Further,
    in this version Cooperate is implemented via reactor's callLater.

        from twisted.internet import reactor
        from twisted.flow import flow

        def res(x): print x
        d = flow.Deferred([1,2,3])
        d.addCallback(res)
        reactor.iterate()

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

Class Variable Summary
Inherited from Deferred
`int` | `called` = 0
`int` | `debug` = 0
`int` | `default` = 0
`int` | `paused` = 0
`NoneType` | `timeoutCall` = None

Generated by Epydoc 2.0 on Sat May 15 20:08:36 2004 | http://epydoc.sf.net