@Contract(threading=SAFE_CONDITIONAL) public final class MinimalHttpAsyncClient extends CloseableHttpAsyncClient
CloseableHttpAsyncClient. This client is
optimized for HTTP/1.1 and HTTP/2 message transport and does not support
advanced HTTP protocol functionality such as request execution via a proxy,
state management, authentication and request redirects.
Concurrent message exchanges executed by this client will get assigned to separate connections leased from the connection pool.
public Future<AsyncClientEndpoint> lease(HttpHost host, FutureCallback<AsyncClientEndpoint> callback)
public Future<AsyncClientEndpoint> lease(HttpHost host, HttpContext context, FutureCallback<AsyncClientEndpoint> callback)
public Cancellable execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
protected <T> Future<T> doExecute(HttpHost httpHost, AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, FutureCallback<T> callback)
doExecute in class CloseableHttpAsyncClientpublic final Cancellable execute(AsyncClientExchangeHandler exchangeHandler)
public final void start()
start in class CloseableHttpAsyncClient@Deprecated public void register(String hostname, String uriPattern, Supplier<AsyncPushConsumer> supplier)
RequestRouter
at the construction timeregister in class CloseableHttpAsyncClientpublic Future<IOSession> connect(NamedEndpoint remoteEndpoint, SocketAddress remoteAddress, SocketAddress localAddress, Timeout timeout, Object attachment, FutureCallback<IOSession> callback)
connect in interface ConnectionInitiatorpublic final IOReactorStatus getStatus()
getStatus in class CloseableHttpAsyncClientpublic final void awaitShutdown(TimeValue waitTime) throws InterruptedException
awaitShutdown in class CloseableHttpAsyncClientInterruptedExceptionpublic final void initiateShutdown()
initiateShutdown in class CloseableHttpAsyncClientpublic final void close(CloseMode closeMode)
close in interface ModalCloseablepublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.