[
https://issues.apache.org/jira/browse/DEFT-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149188#comment-13149188
]
Julien Vermillard commented on DEFT-195:
----------------------------------------
Just curious, what would be the usage of chaining callbacks ?
FYI In MINA we use IoFututre<T>, a Future but listenable :
http://svn.apache.org/repos/asf/mina/trunk/core/src/main/java/org/apache/mina/api/IoFuture.java
http://svn.apache.org/repos/asf/mina/trunk/core/src/main/java/org/apache/mina/util/AbstractIoFuture.java
> Deferred result
> ---------------
>
> Key: DEFT-195
> URL: https://issues.apache.org/jira/browse/DEFT-195
> Project: Deft
> Issue Type: Brainstorming
> Reporter: Roger Schildmeijer
> Priority: Minor
> Attachments: Deferred.java
>
>
> Inspired by twisteds Deferreds
> (http://twistedmatrix.com/documents/current/core/howto/defer.html).
> Short introduction:
> "Twisted uses the Deferred object to manage the callback sequence. The client
> application attaches a series of functions to the deferred to be called in
> order when the results of the asychronous request are available (this series
> of functions is known as a series of callbacks, or a callback chain),
> together with a series of functions to be called if there is an error in the
> asychronous request (known as a series of errbacks or an errback chain). The
> asychronous library code calls the first callback when the result is
> available, or the first errback when an error occurs, and the Deferred object
> then hands the results of each callback or errback function to the next
> function in the chain"
> Deferreds represents the result of an asynchronous operations. (At first they
> look very similar to java.util.concurrent.Future, but they differ somewhat).
> You can..
> attach callbacks and errbacks to a Deferred.
> chain callbacks
> take care of error handling in a more "deterministic" way
> Drawbacks:
> complex abstraction (doesn't fit that well into the current simple
> architecture)
> had to add a return type to AsyncResult
> "type safety" issues (hint: return type of AsyncResult.[onSuccess,
> onFailure])
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira