hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: One ThreadSafeClientConnManager, many DefaultHttpClients
Date Tue, 19 Jul 2011 12:20:42 GMT
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.

Oleg


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