hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Brown <russel...@basho.com>
Subject Re: One ThreadSafeClientConnManager, many DefaultHttpClients
Date Tue, 19 Jul 2011 12:22:29 GMT

On 19 Jul 2011, at 13:20, Oleg Kalnichevski wrote:

> On Tue, 2011-07-19 at 12:50 +0100, Russell Brown wrote:
>> Hi,
>> Is this OK
>> 
>> ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager();
>> 
>> DefaultHttpClient httpClient1 = new DefaultHttpClient(cm);
>> httpClient1.setHttpRequestRetryHandler(handler1);
>> 
>> DefaultHttpClient httpClient2 = new DefaultHttpClient(cm);
>> HttpParams cp2 = http.getParams();
>> cp2.setIntParameter(AllClientPNames.CONNECTION_TIMEOUT, 1000);
>> 
>> DefaultHttpClient httpClient3 = new DefaultHttpClient(cm);
>> httpClient3.setHttpRequestRetryHandler(handler3);
>> HttpParams cp3 = http.getParams();
>> cp3.setIntParameter(AllClientPNames.CONNECTION_TIMEOUT, 5000);
>> 
>> Many thanks in advance
>> 
>> Russell
>> 
> 
> It is OK.

Awesome, thank you!

> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message