hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joan Balaguero" <joan.balagu...@grupoventus.com>
Subject AsyncHttpClient
Date Thu, 28 Jun 2012 15:45:58 GMT
Hello,

 

I’m trying to develop an AsyncHttpService class equivalent to my HttpService
class, which uses the ‘PoolingClientConnectionManager’. After working with
it, I have some doubts:

 

1.  When I create the schemeRegistry:

SchemeRegistry schemeRegistry = new SchemeRegistry();

schemeRegistry.register(new Scheme("http", 80,
PlainSocketFactory.getSocketFactory()));

schemeRegistry.register(new Scheme("https", 443,
SSLSocketFactory.getSocketFactory()));

 

And now:

  AsyncSchemeRegistry asyncSchemeRegistry = new AsyncSchemeRegistry();

  asyncSchemeRegistry.register(new AsyncScheme("http", 80, ?));

  asyncSchemeRegistry.register(new AsyncScheme("https", 443, ?));

 

I don’t understand what a LayeringStrategy is, and how I can pass it to the
AsyncScheme constructor.

 

 

2.  How can I set the ‘ConnectionPoolTimeout ‘?

 

3.  With HttpClient, to set connection and response timeout, cookies, … I
use ‘HttpParams’. What’s the recommended way in Aysnc? HttpParams?
IOReactor?

 

With HttpClient:

HttpConnectionParams.setConnectionTimeout(this.objHttpParams,
connectionTimeout);

HttpConnectionParams.setSoTimeout(this.objHttpParams, responseTimeout);

HttpClientParams.setCookiePolicy(this.objHttpParams,
CookiePolicy.BEST_MATCH);

 

With Async?

this.ioReactorConfig.setConnectTimeout(connectionTimeout);

this.ioReactorConfig.setSoTimeout(responseTimeout);

And cookies?

 

 

4.  Do  ‘stale check’ and ‘expect-continue’ and ‘RetryHandler’ exist in
AsynHttp?

 

5.  To shutdown the pool, should I use
PoolingClientAsyncConnectionManager.shutdown() or
ConnectingIOReactor.shutdown()?

 

 

Many thanks,

Joan.


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