Class InternalHttpClient
java.lang.Object
org.apache.hc.client5.http.impl.classic.CloseableHttpClient
org.apache.hc.client5.http.impl.classic.InternalHttpClient
- All Implemented Interfaces:
Closeable, AutoCloseable, HttpClient, Configurable, org.apache.hc.core5.io.ModalCloseable
@Contract(threading=SAFE_CONDITIONAL)
@Internal
class InternalHttpClient
extends CloseableHttpClient
implements Configurable
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
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> private final ConcurrentLinkedQueue<Closeable> private final HttpClientConnectionManagerprivate final org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> private final CookieStoreprivate final CredentialsProviderprivate final RequestConfigprivate final ExecChainElementprivate static final org.slf4j.Loggerprivate final org.apache.hc.core5.http.impl.io.HttpRequestExecutorprivate final HttpRoutePlanner -
Constructor Summary
ConstructorsConstructorDescriptionInternalHttpClient(HttpClientConnectionManager connManager, org.apache.hc.core5.http.impl.io.HttpRequestExecutor requestExecutor, ExecChainElement execChain, HttpRoutePlanner routePlanner, org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry, org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry, CookieStore cookieStore, CredentialsProvider credentialsProvider, RequestConfig defaultConfig, List<Closeable> closeables) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode) private HttpRoutedetermineRoute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.protocol.HttpContext context) protected CloseableHttpResponsedoExecute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) Returns actual request configuration.private voidsetupContext(HttpClientContext context) Methods inherited from class CloseableHttpClient
execute, execute, execute, execute, execute, execute, execute, executeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HttpClient
executeOpen
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
connManager
-
requestExecutor
private final org.apache.hc.core5.http.impl.io.HttpRequestExecutor requestExecutor -
execChain
-
routePlanner
-
cookieSpecRegistry
-
authSchemeRegistry
-
cookieStore
-
credentialsProvider
-
defaultConfig
-
closeables
-
-
Constructor Details
-
InternalHttpClient
public InternalHttpClient(HttpClientConnectionManager connManager, org.apache.hc.core5.http.impl.io.HttpRequestExecutor requestExecutor, ExecChainElement execChain, HttpRoutePlanner routePlanner, org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry, org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry, CookieStore cookieStore, CredentialsProvider credentialsProvider, RequestConfig defaultConfig, List<Closeable> closeables)
-
-
Method Details
-
determineRoute
private HttpRoute determineRoute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException - Throws:
org.apache.hc.core5.http.HttpException
-
setupContext
-
doExecute
protected CloseableHttpResponse doExecute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException - Specified by:
doExecutein classCloseableHttpClient- Throws:
IOException
-
getConfig
Description copied from interface:ConfigurableReturns actual request configuration.- Specified by:
getConfigin interfaceConfigurable
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode) - Specified by:
closein interfaceorg.apache.hc.core5.io.ModalCloseable
-