geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Genender (JIRA)" <>
Subject [jira] Commented: (GERONIMO-3615) AsyncHttpClient.sendRequest() should return a future
Date Thu, 06 Dec 2007 20:13:43 GMT


Jeff Genender commented on GERONIMO-3615:

Sangjin...thanks for the patch...

Could you do a svn diff from the root of the source code and upload that, since those are
easier to view and work with.  Thanks!

> AsyncHttpClient.sendRequest() should return a future
> ----------------------------------------------------
>                 Key: GERONIMO-3615
>                 URL:
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>         Attachments:
> Currently the caller gets notified when the I/O is completed via AsyncHttpClientCallback.
 While this works for many use cases, there may be situations where sendRequest() returning
a future would lead to a much more straightforward programming model.  This will become much
more powerful especially if one initiates requests to multiple URLs at once.
> I would request that sendRequest() return a future object on which one can query the
status of the operation, and also obtain the result or an error case (exception or timeout)
by calling methods on the future.  It is desirable to have the return type implement java.util.concurrent.Future.
> Furthermore, the implementation class of the Future could retain the reference to the
callback.  Then one can have a consolidated and coherent mechanism of completion (callbacks
firing as a result of future completion).
> In other words, the suggestion is to change the return type of sendRequest() from void
to java.util.concurrent.Future<HttpResponseMessage>.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message