public interface HttpAsyncClient
| Modifier and Type | Method and Description |
|---|---|
<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.
|
<T> Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)
The 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.<T> Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)
The 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.
T - the result type of request execution.requestProducer - request producer callback.responseConsumer - response consumer callaback.callback - future callback.Future<HttpResponse> execute(HttpHost target, HttpRequest request, HttpContext context, FutureCallback<HttpResponse> callback)
Please note it may be unsafe to interact with the context instance while the request is still being executed.
target - 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.Future<HttpResponse> execute(HttpHost target, HttpRequest request, FutureCallback<HttpResponse> callback)
target - 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.Future<HttpResponse> execute(HttpUriRequest request, HttpContext context, FutureCallback<HttpResponse> callback)
Please note it may be unsafe to interact with the context instance while the request is still being executed.
request - the request to executecontext - HTTP contextcallback - future callback.Future<HttpResponse> execute(HttpUriRequest request, FutureCallback<HttpResponse> callback)
request - the request to executecallback - future callback.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.