public class ApacheAsyncHttpProvider extends Object implements AsyncHttpProvider
AsyncHttpProvider
for Apache Http Client 3.1Modifier and Type | Class and Description |
---|---|
class |
ApacheAsyncHttpProvider.ApacheClientRunnable<T> |
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,
List<HttpResponseBodyPart> bodyParts) |
public ApacheAsyncHttpProvider(AsyncHttpClientConfig config)
public <T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler) throws IOException
AsyncHttpProvider
AsyncHandler
when the response arrive.execute
in interface AsyncHttpProvider
handler
- an instance of AsyncHandler
ListenableFuture
of Type T.IOException
public void close()
AsyncHttpProvider
close
in interface AsyncHttpProvider
public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, List<HttpResponseBodyPart> bodyParts)
Copyright © 2014. All Rights Reserved.