@Contract(threading=SAFE_CONDITIONAL) public final class MinimalH2AsyncClient extends CloseableHttpAsyncClient
CloseableHttpAsyncClient
. This client
is optimized for HTTP/2 multiplexing 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 with the same connection route executed by this client will get automatically multiplexed over a single physical HTTP/2 connection.
Modifier and Type | Method and Description |
---|---|
void |
awaitShutdown(org.apache.hc.core5.util.TimeValue waitTime) |
void |
close() |
void |
close(org.apache.hc.core5.io.CloseMode closeMode) |
protected <T> Future<T> |
doExecute(org.apache.hc.core5.http.HttpHost httpHost,
org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory,
org.apache.hc.core5.http.protocol.HttpContext context,
org.apache.hc.core5.concurrent.FutureCallback<T> callback) |
org.apache.hc.core5.concurrent.Cancellable |
execute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler) |
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) |
org.apache.hc.core5.reactor.IOReactorStatus |
getStatus() |
void |
initiateShutdown() |
void |
register(String hostname,
String uriPattern,
org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)
Deprecated.
Use
RequestRouter
at the construction time |
void |
setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,ConnectionConfig> connectionConfigResolver)
Sets
Resolver for ConnectionConfig on a per host basis. |
void |
start() |
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)
public void setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,ConnectionConfig> connectionConfigResolver)
Resolver
for ConnectionConfig
on a per host basis.protected <T> Future<T> doExecute(org.apache.hc.core5.http.HttpHost httpHost, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
doExecute
in class CloseableHttpAsyncClient
public final org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler)
public final void start()
start
in class CloseableHttpAsyncClient
@Deprecated public void register(String hostname, String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)
RequestRouter
at the construction timeregister
in class CloseableHttpAsyncClient
public final org.apache.hc.core5.reactor.IOReactorStatus getStatus()
getStatus
in class CloseableHttpAsyncClient
public final void awaitShutdown(org.apache.hc.core5.util.TimeValue waitTime) throws InterruptedException
awaitShutdown
in class CloseableHttpAsyncClient
InterruptedException
public final void initiateShutdown()
initiateShutdown
in class CloseableHttpAsyncClient
public final void close(org.apache.hc.core5.io.CloseMode closeMode)
public void close()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.