public class FiberCloseableHttpAsyncClient extends CloseableHttpAsyncClient
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<T> Future<T> |
execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
FutureCallback<T> callback)
Initiates asynchronous HTTP request execution using the default
context.
|
<T> Future<T> |
execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
HttpContext context,
FutureCallback<T> callback)
Initiates asynchronous HTTP request execution using the given context.
|
Future<HttpResponse> |
execute(HttpHost target,
HttpRequest request,
FutureCallback<HttpResponse> callback)
Initiates asynchronous HTTP request execution against the given target.
|
Future<HttpResponse> |
execute(HttpHost target,
HttpRequest request,
HttpContext context,
FutureCallback<HttpResponse> callback)
Initiates asynchronous HTTP request execution against the given target
using the given context.
|
Future<HttpResponse> |
execute(HttpUriRequest request,
FutureCallback<HttpResponse> callback)
Initiates asynchronous HTTP request execution.
|
Future<HttpResponse> |
execute(HttpUriRequest request,
HttpContext context,
FutureCallback<HttpResponse> callback)
Initiates asynchronous HTTP request execution using the given
context.
|
boolean |
isRunning() |
void |
start() |
static CloseableHttpAsyncClient |
wrap(CloseableHttpAsyncClient client) |
public static CloseableHttpAsyncClient wrap(CloseableHttpAsyncClient client)
public boolean isRunning()
isRunning in class CloseableHttpAsyncClientpublic void start()
start in class CloseableHttpAsyncClientpublic <T> Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)
org.apache.http.nio.client.HttpAsyncClientThe request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.
execute in interface HttpAsyncClientexecute in class CloseableHttpAsyncClientT - the result type of request execution.requestProducer - request producer callback.responseConsumer - response consumer callaback.callback - future callback.public Future<HttpResponse> execute(HttpHost target, HttpRequest request, HttpContext context, FutureCallback<HttpResponse> callback)
org.apache.http.nio.client.HttpAsyncClientPlease note it may be unsafe to interact with the context instance while the request is still being executed.
execute in interface HttpAsyncClientexecute in class CloseableHttpAsyncClienttarget - the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request - the request to executecontext - the context to use for the execution, or
null to use the default contextcallback - future callback.public Future<HttpResponse> execute(HttpHost target, HttpRequest request, FutureCallback<HttpResponse> callback)
org.apache.http.nio.client.HttpAsyncClientexecute in interface HttpAsyncClientexecute in class CloseableHttpAsyncClienttarget - the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request - the request to executecallback - future callback.public Future<HttpResponse> execute(HttpUriRequest request, FutureCallback<HttpResponse> callback)
org.apache.http.nio.client.HttpAsyncClientexecute in interface HttpAsyncClientexecute in class CloseableHttpAsyncClientrequest - the request to executecallback - future callback.public Future<HttpResponse> execute(HttpUriRequest request, HttpContext context, FutureCallback<HttpResponse> callback)
org.apache.http.nio.client.HttpAsyncClientPlease note it may be unsafe to interact with the context instance while the request is still being executed.
execute in interface HttpAsyncClientexecute in class CloseableHttpAsyncClientrequest - the request to executecontext - HTTP contextcallback - future callback.public void close()
throws IOException
IOExceptionpublic <T> Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)
org.apache.http.nio.client.HttpAsyncClientThe request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.
Please note it may be unsafe to interact with the context instance while the request is still being executed.
T - the result type of request execution.requestProducer - request producer callback.responseConsumer - response consumer callaback.context - HTTP contextcallback - future callback.