public abstract class CloseableHttpAsyncClient extends java.lang.Object implements HttpAsyncClient
HttpAsyncClient that also implements ModalCloseable.| Constructor and Description |
|---|
CloseableHttpAsyncClient() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
awaitShutdown(TimeValue waitTime) |
protected abstract <T> java.util.concurrent.Future<T> |
doExecute(HttpHost target,
AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> pushHandlerFactory,
HttpContext context,
<any> callback) |
<T> java.util.concurrent.Future<T> |
execute(AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> callback) |
<T> java.util.concurrent.Future<T> |
execute(AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> pushHandlerFactory,
HttpContext context,
<any> callback)
Initiates asynchronous HTTP request execution using the given context.
|
<T> java.util.concurrent.Future<T> |
execute(AsyncRequestProducer requestProducer,
<any> responseConsumer,
HttpContext context,
<any> callback) |
<T> java.util.concurrent.Future<T> |
execute(HttpHost target,
AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> pushHandlerFactory,
HttpContext context,
<any> callback) |
java.util.concurrent.Future<SimpleHttpResponse> |
execute(SimpleHttpRequest request,
<any> callback) |
java.util.concurrent.Future<SimpleHttpResponse> |
execute(SimpleHttpRequest request,
HttpContext context,
<any> callback) |
abstract IOReactorStatus |
getStatus() |
abstract void |
initiateShutdown() |
void |
register(java.lang.String uriPattern,
<any> supplier) |
abstract void |
register(java.lang.String hostname,
java.lang.String uriPattern,
<any> supplier) |
abstract void |
start() |
public abstract void start()
public abstract IOReactorStatus getStatus()
public abstract void awaitShutdown(TimeValue waitTime)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic abstract void initiateShutdown()
protected abstract <T> java.util.concurrent.Future<T> doExecute(HttpHost target,
AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> pushHandlerFactory,
HttpContext context,
<any> callback)
public final <T> java.util.concurrent.Future<T> execute(HttpHost target,
AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> pushHandlerFactory,
HttpContext context,
<any> callback)
public final <T> java.util.concurrent.Future<T> execute(AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> pushHandlerFactory,
HttpContext context,
<any> callback)
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.
execute in interface HttpAsyncClientT - the result type of request execution.requestProducer - request producer callback.responseConsumer - response consumer callback.pushHandlerFactory - the push handler factory. Optional and may be null.context - HTTP context. Optional and may be null.callback - future callback. Optional and may be null.public final <T> java.util.concurrent.Future<T> execute(AsyncRequestProducer requestProducer,
<any> responseConsumer,
HttpContext context,
<any> callback)
public final <T> java.util.concurrent.Future<T> execute(AsyncRequestProducer requestProducer,
<any> responseConsumer,
<any> callback)
public final java.util.concurrent.Future<SimpleHttpResponse> execute(SimpleHttpRequest request, HttpContext context, <any> callback)
public final java.util.concurrent.Future<SimpleHttpResponse> execute(SimpleHttpRequest request, <any> callback)
public abstract void register(java.lang.String hostname,
java.lang.String uriPattern,
<any> supplier)
public final void register(java.lang.String uriPattern,
<any> supplier)