Top Description Fields Constructors Methods
org.apache.http.impl.client

pack-priv Class InternalHttpClient

extends CloseableHttpClient
implements Configurable
Class Inheritance
All Implemented Interfaces
org.apache.http.client.methods.Configurable
Annotations
@Contract
threading:SAFE_CONDITIONAL
@SuppressWarnings:deprecation
Imports
java.io.Closeable, .IOException, java.util.List, java.util.concurrent.TimeUnit, org.apache.commons.logging.Log, .LogFactory, org.apache.http.HttpException, .HttpHost, .HttpRequest, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.auth.AuthSchemeProvider, .AuthState, org.apache.http.client.ClientProtocolException, .CookieStore, .CredentialsProvider, org.apache.http.client.config.RequestConfig, org.apache.http.client.methods.CloseableHttpResponse, .Configurable, .HttpExecutionAware, .HttpRequestWrapper, org.apache.http.client.params.ClientPNames, .HttpClientParamConfig, org.apache.http.client.protocol.HttpClientContext, org.apache.http.config.Lookup, org.apache.http.conn.ClientConnectionManager, .ClientConnectionRequest, .HttpClientConnectionManager, .ManagedClientConnection, org.apache.http.conn.routing.HttpRoute, .HttpRoutePlanner, org.apache.http.conn.scheme.SchemeRegistry, org.apache.http.cookie.CookieSpecProvider, org.apache.http.impl.execchain.ClientExecChain, org.apache.http.params.HttpParams, .HttpParamsNames, org.apache.http.protocol.BasicHttpContext, .HttpContext, org.apache.http.util.Args

Internal class.
Since
4.3

Field Summary

Modifier and TypeField and Description
private final Lookup<AuthSchemeProvider>
private final List<Closeable>
private final HttpClientConnectionManager
private final Lookup<CookieSpecProvider>
private final CookieStore
private final CredentialsProvider
private final RequestConfig
private final ClientExecChain
private final Log
private final HttpRoutePlanner

Constructor Summary

AccessConstructor and Description
public
InternalHttpClient(final ClientExecChain execChain, final HttpClientConnectionManager connManager, final HttpRoutePlanner routePlanner, final Lookup<CookieSpecProvider> cookieSpecRegistry, final Lookup<AuthSchemeProvider> 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.
private HttpRoute
determineRoute(final HttpHost target, final HttpRequest request, final HttpContext context)

protected CloseableHttpResponse
doExecute(final HttpHost target, final HttpRequest request, final HttpContext context)

Implements abstract org.apache.http.impl.client.CloseableHttpClient.doExecute.

public RequestConfig
getConfig()

Implements org.apache.http.client.methods.Configurable.getConfig.

Returns actual request configuration.
public ClientConnectionManager
getConnectionManager()

Implements org.apache.http.client.HttpClient.getConnectionManager.

Deprecated as a consequence of ClientConnectionManager being deprecated.
Obtains the connection manager used by this client.
public HttpParams
getParams()

Implements org.apache.http.client.HttpClient.getParams.

Deprecated as a consequence of HttpParams being deprecated.
Obtains the parameters for this client.
private void
Inherited from org.apache.http.impl.client.CloseableHttpClient:
executeexecuteexecuteexecuteexecuteexecuteexecuteexecute

Field Detail

authSchemeRegistryback to summary
private final Lookup<AuthSchemeProvider> authSchemeRegistry
closeablesback to summary
private final List<Closeable> closeables
connManagerback to summary
private final HttpClientConnectionManager connManager
cookieSpecRegistryback to summary
private final Lookup<CookieSpecProvider> 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 ClientExecChain execChain
logback to summary
private final Log log

Hides org.apache.http.impl.client.CloseableHttpClient.log.

routePlannerback to summary
private final HttpRoutePlanner routePlanner

Constructor Detail

InternalHttpClientback to summary
public InternalHttpClient(final ClientExecChain execChain, final HttpClientConnectionManager connManager, final HttpRoutePlanner routePlanner, final Lookup<CookieSpecProvider> cookieSpecRegistry, final Lookup<AuthSchemeProvider> 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
determineRouteback to summary
private HttpRoute determineRoute(final HttpHost target, final HttpRequest request, final HttpContext context) throws HttpException
doExecuteback to summary
protected CloseableHttpResponse doExecute(final HttpHost target, final HttpRequest request, final HttpContext context) throws IOException, ClientProtocolException

Implements abstract org.apache.http.impl.client.CloseableHttpClient.doExecute.

Annotations
@Override
getConfigback to summary
public RequestConfig getConfig()

Implements org.apache.http.client.methods.Configurable.getConfig.

Doc from org.apache.http.client.methods.Configurable.getConfig.

Returns actual request configuration.

Annotations
@Override
getConnectionManagerback to summary
public ClientConnectionManager getConnectionManager()

Implements org.apache.http.client.HttpClient.getConnectionManager.

Doc from org.apache.http.client.HttpClient.getConnectionManager.

Deprecated

as a consequence of ClientConnectionManager being deprecated. See corresponding docs for further information.

Obtains the connection manager used by this client.

Returns:ClientConnectionManager

the connection manager

Annotations
@Override
getParamsback to summary
public HttpParams getParams()

Implements org.apache.http.client.HttpClient.getParams.

Doc from org.apache.http.client.HttpClient.getParams.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Obtains the parameters for this client. These parameters will become defaults for all requests being executed with this client, and for the parameters of dependent objects in this client.

Returns:HttpParams

the default parameters

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