After some thinking...

The getIOLoop() method in HttpRequest is actually correct. What's missing is 
the setIOLoop invocation (should probably be done inside 
HttpProtocol.doGetHttpRequest(..))
The reason for this is so that a user defined RequestHandler will have access 
to its surrounding IOLoop. (In a single threaded environment its sufficient to 
use the IOLoop.INSTANCE if you need the ioloop, e.g. for adding timeouts, 
callback or a new IOHandler).

I will update the issue (DEFT-165).

Thanks

// Roger

On 18 jul 2011, at 22.43em, Julien Vermillard wrote:

> Hi !
> 
> Why in Httprequest there is this ioLoop attribut ?
> 
> public class HttpRequest {
>       
>       private IOLoop ioLoop;
> 
> I think it's not used and create a useless dependency between this
> class and the ioloop package but perhaps it's mean to be used by user
> code ?
> 
> By the way, the code is quite compact, but a small javadoc intro on
> each class could improve overall code readability and help to catch
> more contributors :)
> 
> Regards,
> Julien

Reply via email to