hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Berlin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-148) Create AsyncNHttpServiceHandler & AsyncNHttpClientHandler
Date Tue, 19 Feb 2008 01:32:34 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570075#action_12570075

Sam Berlin commented on HTTPCORE-148:

I tried a quick go at hacking up NHttpRequestHandler, with a separate method for entityRequest
& handle, and immediately noticed a problem with the NBlockingHttpRequestHandler (the
one intended to help with blocking HttpRequestHandlers).  In the new scheme, there doesn't
appear to be a possibility to call HttpRequestHandler.handle (ie, handle on the delegate handler)
while the content is being consumed.  Instead, entityRequest must return a listener that buffers
the entire contents in memory and after it's read, handle is called.  What if ContentListener
(or ConsumingNHttpRequest, whichever ends up being the content-consuming-callback) returned
true|false to consumeContent to indicate whether or not flow can continue?  In normal cases,
it would always return decoder.isComplete(), but in the special case of delegating to blocking
handlers, it would return true immediately, indicating that a response can be handled right
away.  Basically, it's a question of whether or not the listener requires all its content
to be consumed before it's used.

> Create AsyncNHttpServiceHandler & AsyncNHttpClientHandler
> ---------------------------------------------------------
>                 Key: HTTPCORE-148
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-148
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore NIO
>    Affects Versions: 4.0-beta2
>            Reporter: Sam Berlin
>            Assignee: Oleg Kalnichevski
>         Attachments: changes.txt
> Attached is a patch for AsyncNHttpServiceHandler.  It actually works (as tested by running
& hitting it with IE.)  :)
> To test, run the example 'AsyncNHttpFileServer' in the examples directory or the TestAsyncNHttpHandlers

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

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message