Class HttpClientUtil
- java.lang.Object
-
- org.apache.solr.client.solrj.impl.HttpClientUtil
-
@Deprecated(since="9.0") public class HttpClientUtil extends Object
Deprecated.Used to configure the Apache HTTP client. Please use The Http2 clientUtility class for creating/configuring httpclient instances.This class can touch internal HttpClient details and is subject to change.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classHttpClientUtil.GzipDecompressingEntityDeprecated.static classHttpClientUtil.SocketFactoryRegistryProviderDeprecated.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONNECT_TIMEOUTDeprecated.static intDEFAULT_MAXCONNECTIONSDeprecated.static intDEFAULT_MAXCONNECTIONSPERHOSTDeprecated.static intDEFAULT_SO_TIMEOUTDeprecated.static StringPROP_ALLOW_COMPRESSIONDeprecated.static StringPROP_BASIC_AUTH_PASSDeprecated.static StringPROP_BASIC_AUTH_USERDeprecated.static StringPROP_CONNECTION_TIMEOUTDeprecated.static StringPROP_FOLLOW_REDIRECTSDeprecated.static StringPROP_MAX_CONNECTIONSDeprecated.static StringPROP_MAX_CONNECTIONS_PER_HOSTDeprecated.static StringPROP_SO_TIMEOUTDeprecated.static StringPROP_USE_RETRYDeprecated.static StringSYS_PROP_CHECK_PEER_NAMEDeprecated.System property consulted to determine if the defaultHttpClientUtil.SocketFactoryRegistryProviderwill require hostname validation of SSL Certificates.static StringSYS_PROP_HTTP_CLIENT_BUILDER_FACTORYDeprecated.A Java system property to select the HttpClientBuilderFactory used for configuring the HttpClientBuilder instance by default.static StringSYS_PROP_SOCKET_FACTORY_REGISTRY_PROVIDERDeprecated.A Java system property to select the HttpClientUtil.SocketFactoryRegistryProvider used for configuring the Apache HTTP clients.
-
Constructor Summary
Constructors Constructor Description HttpClientUtil()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddRequestInterceptor(org.apache.http.HttpRequestInterceptor interceptor)Deprecated.static voidclearRequestInterceptors()Deprecated.static voidclose(org.apache.http.client.HttpClient httpClient)Deprecated.static org.apache.http.impl.client.CloseableHttpClientcreateClient(SolrParams params)Deprecated.Creates new http client by using the provided configuration.static org.apache.http.impl.client.CloseableHttpClientcreateClient(SolrParams params, org.apache.http.impl.conn.PoolingHttpClientConnectionManager cm)Deprecated.static org.apache.http.impl.client.CloseableHttpClientcreateClient(SolrParams params, org.apache.http.impl.conn.PoolingHttpClientConnectionManager cm, boolean sharedConnectionManager)Deprecated.Creates new http client by using the provided configuration.static org.apache.http.impl.client.CloseableHttpClientcreateClient(SolrParams params, org.apache.http.impl.conn.PoolingHttpClientConnectionManager cm, boolean sharedConnectionManager, org.apache.http.protocol.HttpRequestExecutor httpRequestExecutor)Deprecated.static org.apache.http.client.config.RequestConfig.BuildercreateDefaultRequestConfigBuilder()Deprecated.static org.apache.http.client.protocol.HttpClientContextcreateNewHttpClientRequestContext()Deprecated.Create a HttpClientContext object andHttpClientContext.setUserToken(Object)to an internal singleton.static SolrHttpClientBuildergetHttpClientBuilder()Deprecated.static HttpClientUtil.SocketFactoryRegistryProvidergetSocketFactoryRegistryProvider()Deprecated.static voidremoveRequestInterceptor(org.apache.http.HttpRequestInterceptor interceptor)Deprecated.static voidresetHttpClientBuilder()Deprecated.static voidsetCookiePolicy(String policyName)Deprecated.static voidsetHttpClientBuilder(SolrHttpClientBuilder newHttpClientBuilder)Deprecated.static voidsetHttpClientProvider(SolrHttpClientBuilder newHttpClientBuilder)Deprecated.static voidsetHttpClientRequestContextBuilder(SolrHttpClientContextBuilder httpClientContextBuilder)Deprecated.static voidsetSocketFactoryRegistryProvider(HttpClientUtil.SocketFactoryRegistryProvider newRegistryProvider)Deprecated.
-
-
-
Field Detail
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_SO_TIMEOUT
public static final int DEFAULT_SO_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_MAXCONNECTIONSPERHOST
public static final int DEFAULT_MAXCONNECTIONSPERHOST
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_MAXCONNECTIONS
public static final int DEFAULT_MAXCONNECTIONS
Deprecated.- See Also:
- Constant Field Values
-
PROP_MAX_CONNECTIONS_PER_HOST
public static final String PROP_MAX_CONNECTIONS_PER_HOST
Deprecated.- See Also:
- Constant Field Values
-
PROP_MAX_CONNECTIONS
public static final String PROP_MAX_CONNECTIONS
Deprecated.- See Also:
- Constant Field Values
-
PROP_USE_RETRY
public static final String PROP_USE_RETRY
Deprecated.- See Also:
- Constant Field Values
-
PROP_ALLOW_COMPRESSION
public static final String PROP_ALLOW_COMPRESSION
Deprecated.- See Also:
- Constant Field Values
-
PROP_BASIC_AUTH_USER
public static final String PROP_BASIC_AUTH_USER
Deprecated.- See Also:
- Constant Field Values
-
PROP_BASIC_AUTH_PASS
public static final String PROP_BASIC_AUTH_PASS
Deprecated.- See Also:
- Constant Field Values
-
SYS_PROP_CHECK_PEER_NAME
public static final String SYS_PROP_CHECK_PEER_NAME
Deprecated.System property consulted to determine if the defaultHttpClientUtil.SocketFactoryRegistryProviderwill require hostname validation of SSL Certificates. The default behavior is to enforce peer name validation.This property will have no effect if
setSocketFactoryRegistryProvider(org.apache.solr.client.solrj.impl.HttpClientUtil.SocketFactoryRegistryProvider)is used to override the defaultHttpClientUtil.SocketFactoryRegistryProvider- See Also:
- Constant Field Values
-
PROP_FOLLOW_REDIRECTS
public static final String PROP_FOLLOW_REDIRECTS
Deprecated.- See Also:
- Constant Field Values
-
PROP_SO_TIMEOUT
public static final String PROP_SO_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
PROP_CONNECTION_TIMEOUT
public static final String PROP_CONNECTION_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
SYS_PROP_HTTP_CLIENT_BUILDER_FACTORY
public static final String SYS_PROP_HTTP_CLIENT_BUILDER_FACTORY
Deprecated.A Java system property to select the HttpClientBuilderFactory used for configuring the HttpClientBuilder instance by default.- See Also:
- Constant Field Values
-
SYS_PROP_SOCKET_FACTORY_REGISTRY_PROVIDER
public static final String SYS_PROP_SOCKET_FACTORY_REGISTRY_PROVIDER
Deprecated.A Java system property to select the HttpClientUtil.SocketFactoryRegistryProvider used for configuring the Apache HTTP clients.- See Also:
- Constant Field Values
-
-
Method Detail
-
setHttpClientBuilder
public static void setHttpClientBuilder(SolrHttpClientBuilder newHttpClientBuilder)
Deprecated.
-
setHttpClientProvider
public static void setHttpClientProvider(SolrHttpClientBuilder newHttpClientBuilder)
Deprecated.
-
setSocketFactoryRegistryProvider
public static void setSocketFactoryRegistryProvider(HttpClientUtil.SocketFactoryRegistryProvider newRegistryProvider)
Deprecated.- See Also:
SYS_PROP_CHECK_PEER_NAME
-
getHttpClientBuilder
public static SolrHttpClientBuilder getHttpClientBuilder()
Deprecated.
-
getSocketFactoryRegistryProvider
public static HttpClientUtil.SocketFactoryRegistryProvider getSocketFactoryRegistryProvider()
Deprecated.- See Also:
SYS_PROP_CHECK_PEER_NAME
-
resetHttpClientBuilder
public static void resetHttpClientBuilder()
Deprecated.
-
createClient
public static org.apache.http.impl.client.CloseableHttpClient createClient(SolrParams params)
Deprecated.Creates new http client by using the provided configuration.- Parameters:
params- http client configuration, if null a client with default configuration (no additional configuration) is created.
-
createClient
public static org.apache.http.impl.client.CloseableHttpClient createClient(SolrParams params, org.apache.http.impl.conn.PoolingHttpClientConnectionManager cm)
Deprecated.
-
createClient
public static org.apache.http.impl.client.CloseableHttpClient createClient(SolrParams params, org.apache.http.impl.conn.PoolingHttpClientConnectionManager cm, boolean sharedConnectionManager, org.apache.http.protocol.HttpRequestExecutor httpRequestExecutor)
Deprecated.
-
createClient
public static org.apache.http.impl.client.CloseableHttpClient createClient(SolrParams params, org.apache.http.impl.conn.PoolingHttpClientConnectionManager cm, boolean sharedConnectionManager)
Deprecated.Creates new http client by using the provided configuration.
-
close
public static void close(org.apache.http.client.HttpClient httpClient)
Deprecated.
-
addRequestInterceptor
public static void addRequestInterceptor(org.apache.http.HttpRequestInterceptor interceptor)
Deprecated.
-
removeRequestInterceptor
public static void removeRequestInterceptor(org.apache.http.HttpRequestInterceptor interceptor)
Deprecated.
-
clearRequestInterceptors
public static void clearRequestInterceptors()
Deprecated.
-
setHttpClientRequestContextBuilder
public static void setHttpClientRequestContextBuilder(SolrHttpClientContextBuilder httpClientContextBuilder)
Deprecated.
-
createNewHttpClientRequestContext
public static org.apache.http.client.protocol.HttpClientContext createNewHttpClientRequestContext()
Deprecated.Create a HttpClientContext object andHttpClientContext.setUserToken(Object)to an internal singleton. It allows to reuse underneathHttpClientin connection pools if client authentication is enabled.
-
createDefaultRequestConfigBuilder
public static org.apache.http.client.config.RequestConfig.Builder createDefaultRequestConfigBuilder()
Deprecated.
-
setCookiePolicy
public static void setCookiePolicy(String policyName)
Deprecated.
-
-