public class ApacheAsyncHttpProvider extends Object implements AsyncHttpProvider
AsyncHttpProvider for Apache Http Client 3.1| Modifier and Type | Class and Description | 
|---|---|
class  | 
ApacheAsyncHttpProvider.ApacheClientRunnable<T>  | 
class  | 
ApacheAsyncHttpProvider.EntityWriterRequestEntity  | 
| Constructor and Description | 
|---|
ApacheAsyncHttpProvider(AsyncHttpClientConfig config)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Close the current underlying TCP/HTTP connection. 
 | 
<T> ListenableFuture<T> | 
execute(Request request,
       AsyncHandler<T> handler)
Execute the request and invoke the  
AsyncHandler when the response arrive. | 
Response | 
prepareResponse(HttpResponseStatus status,
               HttpResponseHeaders headers,
               Collection<HttpResponseBodyPart> bodyParts)
Prepare a  
Response | 
protected static int | 
requestTimeout(AsyncHttpClientConfig config,
              PerRequestConfig perRequestConfig)  | 
public ApacheAsyncHttpProvider(AsyncHttpClientConfig config)
public <T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler) throws IOException
AsyncHttpProviderAsyncHandler when the response arrive.execute in interface AsyncHttpProviderhandler - an instance of AsyncHandlerListenableFuture of Type T.IOExceptionpublic void close()
AsyncHttpProviderclose in interface AsyncHttpProviderpublic Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, Collection<HttpResponseBodyPart> bodyParts)
AsyncHttpProviderResponseprepareResponse in interface AsyncHttpProviderstatus - HttpResponseStatusheaders - HttpResponseHeadersbodyParts - list of HttpResponseBodyPartResponseprotected static int requestTimeout(AsyncHttpClientConfig config, PerRequestConfig perRequestConfig)
Copyright © 2015. All rights reserved.