Package flumotion :: Package twisted :: Module defer :: Class Resolution
[hide private]

Class Resolution

source code

Known Subclasses:

I am a helper class to make sure that the deferred is fired only once with either a result or exception.

Instance Methods [hide private]
 
__init__(self) source code
 
cleanup(self)
Clean up any resources related to the resolution.
source code
 
callback(self, result)
Make the result succeed, triggering the callbacks with the given result.
source code
 
errback(self, exception)
Make the result fail, triggering the errbacks with the given exception.
source code
Instance Variables [hide private]
twisted.internet.defer.Deferred d
the deferred that gets fired as part of the resolution
Method Details [hide private]

cleanup(self)

source code 

Clean up any resources related to the resolution. Subclasses can implement me.

callback(self, result)

source code 

Make the result succeed, triggering the callbacks with the given result. If a result was already reached, do nothing.

errback(self, exception)

source code 

Make the result fail, triggering the errbacks with the given exception. If a result was already reached, do nothing.