hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Brown <russel...@basho.com>
Subject One ThreadSafeClientConnManager, many DefaultHttpClients
Date Tue, 19 Jul 2011 11:50:14 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message