You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by HockeyDave <da...@yahoo.com> on 2009/09/03 14:54:33 UTC

SynchBasicHttpParams and ImmutableHttpProcessor missing

The NIO httpcomponents client tutorial (•Basic non-blocking HTTP client) uses
2 classes which are missing from 4.0.1 release.  so.... downloaded
4.1-SNAPSHOT.  Classes are still missing.  
Downloaded the two files (found them w/ a google search).  Added them to my
project.

Now ImmutableHttpProcessor is okay, but SyncBasicHttpParams is not good
because it extends the class BasicHttpParams which in both the 4.0.1 release
and the 4.1-SNAPSHOT is a final class.

can we get this remedied as I would like to try out the NIO implementation
to see if that helps the performance of my use case?

Thanks.
-- 
View this message in context: http://www.nabble.com/SynchBasicHttpParams-and-ImmutableHttpProcessor-missing-tp25275401p25275401.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Re: SynchBasicHttpParams and ImmutableHttpProcessor missing

Posted by Oleg Kalnichevski <ol...@apache.org>.
HockeyDave wrote:
> Hi Oleg.
> 
> Still struggling a bit with the NIO example.  How would one get the Response
> Entity Output?
> 
>             HttpContext context = conn.getContext();
>             BasicHttpRequest httpget = new BasicHttpRequest("GET", "/",
> HttpVersion.HTTP_1_1);
>             RequestHandle handle = new RequestHandle(connMgr, conn); 
>             
>             context.setAttribute("request", httpget);
>             context.setAttribute("request-handle", handle);
>             
>             queue.add(handle);            
>             conn.requestOutput();
> // I assume something should go here to get and process the response
> data???????
> 
> Thanks.
> Dave

Dave,

Make sure you have read this tutorial:

http://hc.apache.org/httpcomponents-core/tutorial/html/index.html

Especially this bit:

http://hc.apache.org/httpcomponents-core/tutorial/html/nio.html#d0e1686

Hope this helps

Oleg

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


Re: SynchBasicHttpParams and ImmutableHttpProcessor missing

Posted by HockeyDave <da...@yahoo.com>.
Hi Oleg.

Still struggling a bit with the NIO example.  How would one get the Response
Entity Output?

            HttpContext context = conn.getContext();
            BasicHttpRequest httpget = new BasicHttpRequest("GET", "/",
HttpVersion.HTTP_1_1);
            RequestHandle handle = new RequestHandle(connMgr, conn); 
            
            context.setAttribute("request", httpget);
            context.setAttribute("request-handle", handle);
            
            queue.add(handle);            
            conn.requestOutput();
// I assume something should go here to get and process the response
data???????

Thanks.
Dave
-- 
View this message in context: http://www.nabble.com/SynchBasicHttpParams-and-ImmutableHttpProcessor-missing-tp25275401p25301139.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Re: SynchBasicHttpParams and ImmutableHttpProcessor missing

Posted by HockeyDave <da...@yahoo.com>.
Thanks Oleg.  Pertaining to your comment about using examples shipped with
the product...  I don't know about most people, but we're a heavy maven shop
here so I don't really download products any more.  We just edit our pom
file and magically it all works.  :)

If we need tutorials, we generally come back and get them separately.  I do
appreciate you guys moving to maven and realize that you're in a transition
phase so no worrries.

Best.
-- 
View this message in context: http://www.nabble.com/SynchBasicHttpParams-and-ImmutableHttpProcessor-missing-tp25275401p25278250.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Re: SynchBasicHttpParams and ImmutableHttpProcessor missing

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, Sep 03, 2009 at 05:54:33AM -0700, HockeyDave wrote:
> 
> The NIO httpcomponents client tutorial (???Basic non-blocking HTTP client) uses
> 2 classes which are missing from 4.0.1 release.  so.... downloaded
> 4.1-SNAPSHOT.  Classes are still missing.  
> Downloaded the two files (found them w/ a google search).  Added them to my
> project.
> 
> Now ImmutableHttpProcessor is okay, but SyncBasicHttpParams is not good
> because it extends the class BasicHttpParams which in both the 4.0.1 release
> and the 4.1-SNAPSHOT is a final class.
> 

I changed the examples page to point at the 4.0.x branch

http://hc.apache.org/httpcomponents-core/examples.html

Ideally one should be using examples shipped with the official release package.


> can we get this remedied as I would like to try out the NIO implementation
> to see if that helps the performance of my use case?
> 

Please note that generally NIO tends to be _significantly_ slower in terms of
raw data throughput compared to the classic I/O unless the number of concurrent
connections exceeds 2500 or even 5000. So, set your expectations right.

Oleg



> Thanks.
> -- 
> View this message in context: http://www.nabble.com/SynchBasicHttpParams-and-ImmutableHttpProcessor-missing-tp25275401p25275401.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

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