Class InternalAbstractHttpAsyncClient
- 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.InternalAbstractHttpAsyncClient
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,HttpAsyncClient
,org.apache.hc.core5.io.ModalCloseable
- Direct Known Subclasses:
InternalH2AsyncClient
,InternalHttpAsyncClient
abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
InternalAbstractHttpAsyncClient.ScheduledRequestExecution
-
Nested classes/interfaces inherited from class org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
AbstractHttpAsyncClientBase.Status
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory>
authSchemeRegistry
private java.util.concurrent.ConcurrentLinkedQueue<java.io.Closeable>
closeables
private org.apache.hc.core5.http.config.Lookup<CookieSpecFactory>
cookieSpecRegistry
private CookieStore
cookieStore
private CredentialsProvider
credentialsProvider
private RequestConfig
defaultConfig
private AsyncExecChainElement
execChain
private static org.slf4j.Logger
LOG
private java.util.concurrent.ScheduledExecutorService
scheduledExecutorService
private AsyncExecChain.Scheduler
scheduler
private static java.util.concurrent.ThreadFactory
SCHEDULER_THREAD_FACTORY
-
Constructor Summary
Constructors Constructor Description InternalAbstractHttpAsyncClient(org.apache.hc.core5.reactor.DefaultConnectingIOReactor ioReactor, AsyncPushConsumerRegistry pushConsumerRegistry, java.util.concurrent.ThreadFactory threadFactory, AsyncExecChainElement execChain, org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry, org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry, CookieStore cookieStore, CredentialsProvider credentialsProvider, RequestConfig defaultConfig, java.util.List<java.io.Closeable> closeables)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract AsyncExecRuntime
createAsyncExecRuntime(org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory)
(package private) abstract HttpRoute
determineRoute(org.apache.hc.core5.http.HttpHost httpHost, HttpClientContext clientContext)
protected <T> java.util.concurrent.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)
(package private) void
executeImmediate(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.nio.AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback asyncExecCallback)
(package private) void
executeScheduled(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.nio.AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback asyncExecCallback, org.apache.hc.core5.util.TimeValue delay)
(package private) void
internalClose(org.apache.hc.core5.io.CloseMode closeMode)
private void
setupContext(HttpClientContext context)
-
Methods inherited from class org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
awaitShutdown, close, close, getConnectionInitiator, getStatus, initiateShutdown, isRunning, register, start
-
-
-
-
Field Detail
-
SCHEDULER_THREAD_FACTORY
private static final java.util.concurrent.ThreadFactory SCHEDULER_THREAD_FACTORY
-
LOG
private static final org.slf4j.Logger LOG
-
execChain
private final AsyncExecChainElement execChain
-
cookieSpecRegistry
private final org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry
-
authSchemeRegistry
private final org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry
-
cookieStore
private final CookieStore cookieStore
-
credentialsProvider
private final CredentialsProvider credentialsProvider
-
defaultConfig
private final RequestConfig defaultConfig
-
closeables
private final java.util.concurrent.ConcurrentLinkedQueue<java.io.Closeable> closeables
-
scheduledExecutorService
private final java.util.concurrent.ScheduledExecutorService scheduledExecutorService
-
scheduler
private final AsyncExecChain.Scheduler scheduler
-
-
Constructor Detail
-
InternalAbstractHttpAsyncClient
InternalAbstractHttpAsyncClient(org.apache.hc.core5.reactor.DefaultConnectingIOReactor ioReactor, AsyncPushConsumerRegistry pushConsumerRegistry, java.util.concurrent.ThreadFactory threadFactory, AsyncExecChainElement execChain, org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry, org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry, CookieStore cookieStore, CredentialsProvider credentialsProvider, RequestConfig defaultConfig, java.util.List<java.io.Closeable> closeables)
-
-
Method Detail
-
internalClose
void internalClose(org.apache.hc.core5.io.CloseMode closeMode)
- Overrides:
internalClose
in classAbstractHttpAsyncClientBase
-
setupContext
private void setupContext(HttpClientContext context)
-
createAsyncExecRuntime
abstract AsyncExecRuntime createAsyncExecRuntime(org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory)
-
determineRoute
abstract HttpRoute determineRoute(org.apache.hc.core5.http.HttpHost httpHost, HttpClientContext clientContext) throws org.apache.hc.core5.http.HttpException
- Throws:
org.apache.hc.core5.http.HttpException
-
doExecute
protected <T> java.util.concurrent.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)
- Specified by:
doExecute
in classCloseableHttpAsyncClient
-
executeImmediate
void executeImmediate(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.nio.AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback asyncExecCallback) throws org.apache.hc.core5.http.HttpException, java.io.IOException
- Throws:
org.apache.hc.core5.http.HttpException
java.io.IOException
-
executeScheduled
void executeScheduled(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.nio.AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback asyncExecCallback, org.apache.hc.core5.util.TimeValue delay)
-
-