Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.classic

pack-priv Class InternalHttpClient

extends CloseableHttpClient
implements Configurable
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.config.Configurable
Annotations
@Contract
threading:SAFE_CONDITIONAL
@Internal
Imports
java.io.Closeable, .IOException, java.util.List, java.util.concurrent.ConcurrentLinkedQueue, org.apache.hc.client5.http.ClientProtocolException, .HttpRoute, org.apache.hc.client5.http.auth.AuthSchemeFactory, .CredentialsProvider, org.apache.hc.client5.http.classic.ExecChain, .ExecRuntime, org.apache.hc.client5.http.config.Configurable, .RequestConfig, org.apache.hc.client5.http.cookie.CookieSpecFactory, .CookieStore, org.apache.hc.client5.http.impl.ExecSupport, org.apache.hc.client5.http.io.HttpClientConnectionManager, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.client5.http.routing.HttpRoutePlanner, .RoutingSupport, org.apache.hc.core5.annotation.Contract, .Internal, .ThreadingBehavior, org.apache.hc.core5.concurrent.CancellableDependency, org.apache.hc.core5.http.ClassicHttpRequest, .ClassicHttpResponse, .HttpException, .HttpHost, org.apache.hc.core5.http.config.Lookup, org.apache.hc.core5.http.impl.io.HttpRequestExecutor, org.apache.hc.core5.http.io.support.ClassicRequestBuilder, org.apache.hc.core5.http.protocol.BasicHttpContext, .HttpContext, org.apache.hc.core5.io.CloseMode, .ModalCloseable, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

Internal implementation of CloseableHttpClient.

Concurrent message exchanges executed by this client will get assigned to separate connections leased from the connection pool.

Since
4.3

Field Summary

Modifier and TypeField and Description
private final Lookup<AuthSchemeFactory>
private final ConcurrentLinkedQueue<Closeable>
private final HttpClientConnectionManager
private final Lookup<CookieSpecFactory>
private final CookieStore
private final CredentialsProvider
private final RequestConfig
private final ExecChainElement
private static final Logger
private final HttpRequestExecutor
private final HttpRoutePlanner

Constructor Summary

AccessConstructor and Description
public
InternalHttpClient(final HttpClientConnectionManager connManager, final HttpRequestExecutor requestExecutor, final ExecChainElement execChain, final HttpRoutePlanner routePlanner, final Lookup<CookieSpecFactory> cookieSpecRegistry, final Lookup<AuthSchemeFactory> authSchemeRegistry, final CookieStore cookieStore, final CredentialsProvider credentialsProvider, final RequestConfig defaultConfig, final List<Closeable> closeables)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
public void
close(final CloseMode
How to close the receiver.
closeMode
)

Implements org.apache.hc.core5.io.ModalCloseable.close.

Closes this process or endpoint and releases any system resources associated with it.
private HttpRoute
determineRoute(final HttpHost target, final HttpContext context)

protected CloseableHttpResponse
public RequestConfig
getConfig()

Implements org.apache.hc.client5.http.config.Configurable.getConfig.

Returns actual request configuration.
private void
Inherited from org.apache.hc.client5.http.impl.classic.CloseableHttpClient:
executeexecuteexecuteexecuteexecuteexecuteexecuteexecute

Field Detail

authSchemeRegistryback to summary
private final Lookup<AuthSchemeFactory> authSchemeRegistry
closeablesback to summary
private final ConcurrentLinkedQueue<Closeable> closeables
connManagerback to summary
private final HttpClientConnectionManager connManager
cookieSpecRegistryback to summary
private final Lookup<CookieSpecFactory> cookieSpecRegistry
cookieStoreback to summary
private final CookieStore cookieStore
credentialsProviderback to summary
private final CredentialsProvider credentialsProvider
defaultConfigback to summary
private final RequestConfig defaultConfig
execChainback to summary
private final ExecChainElement execChain
LOGback to summary
private static final Logger LOG

Hides org.apache.hc.client5.http.impl.classic.CloseableHttpClient.LOG.

requestExecutorback to summary
private final HttpRequestExecutor requestExecutor
routePlannerback to summary
private final HttpRoutePlanner routePlanner

Constructor Detail

InternalHttpClientback to summary
public InternalHttpClient(final HttpClientConnectionManager connManager, final HttpRequestExecutor requestExecutor, final ExecChainElement execChain, final HttpRoutePlanner routePlanner, final Lookup<CookieSpecFactory> cookieSpecRegistry, final Lookup<AuthSchemeFactory> authSchemeRegistry, final CookieStore cookieStore, final CredentialsProvider credentialsProvider, final RequestConfig defaultConfig, final List<Closeable> closeables)

Method Detail

closeback to summary
public void close()

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
closeback to summary
public void close(final CloseMode closeMode)

Implements org.apache.hc.core5.io.ModalCloseable.close.

Doc from org.apache.hc.core5.io.ModalCloseable.close.

Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.

Parameters
closeMode:CloseMode

How to close the receiver.

Annotations
@Override
determineRouteback to summary
private HttpRoute determineRoute(final HttpHost target, final HttpContext context) throws HttpException
doExecuteback to summary
protected CloseableHttpResponse doExecute(final HttpHost target, final ClassicHttpRequest request, final HttpContext context) throws IOException

Implements abstract org.apache.hc.client5.http.impl.classic.CloseableHttpClient.doExecute.

Annotations
@Override
getConfigback to summary
public RequestConfig getConfig()

Implements org.apache.hc.client5.http.config.Configurable.getConfig.

Doc from org.apache.hc.client5.http.config.Configurable.getConfig.

Returns actual request configuration.

Annotations
@Override
setupContextback to summary
private void setupContext(final HttpClientContext context)