Class MinimalHttpAsyncClient
java.lang.Object
org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
org.apache.hc.client5.http.impl.async.AbstractMinimalHttpAsyncClientBase
org.apache.hc.client5.http.impl.async.MinimalHttpAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HttpAsyncClient
,org.apache.hc.core5.io.ModalCloseable
@Contract(threading=SAFE_CONDITIONAL)
public final class MinimalHttpAsyncClient
extends AbstractMinimalHttpAsyncClientBase
Minimal implementation of
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.
- Since:
- 5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Nested classes/interfaces inherited from class org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
AbstractHttpAsyncClientBase.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final AsyncClientConnectionManager
private final SchemePortResolver
private final TlsConfig
-
Constructor Summary
ConstructorsConstructorDescriptionMinimalHttpAsyncClient
(org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, AsyncPushConsumerRegistry pushConsumerRegistry, org.apache.hc.core5.reactor.IOReactorConfig reactorConfig, ThreadFactory threadFactory, ThreadFactory workerThreadFactory, AsyncClientConnectionManager manager, SchemePortResolver schemePortResolver, TlsConfig tlsConfig) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.concurrent.Cancellable
execute
(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context) Future
<org.apache.hc.core5.http.nio.AsyncClientEndpoint> lease
(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.nio.AsyncClientEndpoint> callback) Future
<org.apache.hc.core5.http.nio.AsyncClientEndpoint> lease
(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.nio.AsyncClientEndpoint> callback) private Future
<AsyncConnectionEndpoint> leaseEndpoint
(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout connectionRequestTimeout, org.apache.hc.core5.util.Timeout connectTimeout, HttpClientContext clientContext, org.apache.hc.core5.concurrent.FutureCallback<AsyncConnectionEndpoint> callback) Methods inherited from class org.apache.hc.client5.http.impl.async.AbstractMinimalHttpAsyncClientBase
doExecute, execute
Methods inherited from class org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
awaitShutdown, close, close, getConnectionInitiator, getStatus, initiateShutdown, internalClose, isRunning, register, start
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
manager
-
schemePortResolver
-
tlsConfig
-
-
Constructor Details
-
MinimalHttpAsyncClient
MinimalHttpAsyncClient(org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, AsyncPushConsumerRegistry pushConsumerRegistry, org.apache.hc.core5.reactor.IOReactorConfig reactorConfig, ThreadFactory threadFactory, ThreadFactory workerThreadFactory, AsyncClientConnectionManager manager, SchemePortResolver schemePortResolver, TlsConfig tlsConfig)
-
-
Method Details
-
leaseEndpoint
private Future<AsyncConnectionEndpoint> leaseEndpoint(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout connectionRequestTimeout, org.apache.hc.core5.util.Timeout connectTimeout, HttpClientContext clientContext, org.apache.hc.core5.concurrent.FutureCallback<AsyncConnectionEndpoint> callback) -
lease
public Future<org.apache.hc.core5.http.nio.AsyncClientEndpoint> lease(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.nio.AsyncClientEndpoint> callback) -
lease
public Future<org.apache.hc.core5.http.nio.AsyncClientEndpoint> lease(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.nio.AsyncClientEndpoint> callback) -
execute
public org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context) - Specified by:
execute
in classAbstractMinimalHttpAsyncClientBase
-