Hello,
Im 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 dont 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. Whats 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.