Package org.apache.tika.client
Class HttpClientFactory
- java.lang.Object
-
- org.apache.tika.client.HttpClientFactory
-
public class HttpClientFactory extends Object
This holds quite a bit of state and is not thread safe. Beware!Also, we're currently ignoring the SSL checks. Please open a ticket/PR if you need robust SSL.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAES_ENV_VAR
-
Constructor Summary
Constructors Constructor Description HttpClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.client.HttpClientbuild()HttpClientFactorycopy()Set<String>getAllowedHostsForRedirect()StringgetAuthScheme()intgetConnectTimeout()intgetKeepAliveOnBadKeepAliveValueMs()org.apache.http.conn.ConnectionKeepAliveStrategygetKeepAliveStrategy()intgetMaxConnections()intgetMaxConnectionsPerRoute()StringgetNtDomain()StringgetPassword()StringgetProxyHost()intgetProxyPort()intgetRequestTimeout()intgetSocketTimeout()StringgetUserName()voidsetAllowedHostsForRedirect(Set<String> allowedHostsForRedirect)voidsetAuthScheme(String authScheme)only basic and ntlm are supportedvoidsetConnectTimeout(int connectTimeout)voidsetCredentialsAESEncrypted(boolean credentialsAESEncrypted)voidsetDisableContentCompression(boolean disableContentCompression)voidsetKeepAliveOnBadKeepAliveValueMs(int keepAliveOnBadKeepAliveValueMs)voidsetMaxConnections(int maxConnections)voidsetMaxConnectionsPerRoute(int maxConnectionsPerRoute)voidsetNtDomain(String ntDomain)voidsetPassword(String password)voidsetProxyHost(String proxyHost)voidsetProxyPort(int proxyPort)voidsetRequestTimeout(int requestTimeout)voidsetSocketTimeout(int socketTimeout)voidsetUserName(String userName)
-
-
-
Field Detail
-
AES_ENV_VAR
public static final String AES_ENV_VAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProxyHost
public String getProxyHost()
-
setProxyHost
public void setProxyHost(String proxyHost)
-
getProxyPort
public int getProxyPort()
-
setProxyPort
public void setProxyPort(int proxyPort)
-
setAllowedHostsForRedirect
public void setAllowedHostsForRedirect(Set<String> allowedHostsForRedirect)
-
getMaxConnectionsPerRoute
public int getMaxConnectionsPerRoute()
-
setMaxConnectionsPerRoute
public void setMaxConnectionsPerRoute(int maxConnectionsPerRoute)
-
getMaxConnections
public int getMaxConnections()
-
setMaxConnections
public void setMaxConnections(int maxConnections)
-
getRequestTimeout
public int getRequestTimeout()
-
setRequestTimeout
public void setRequestTimeout(int requestTimeout)
-
getConnectTimeout
public int getConnectTimeout()
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout)
-
getSocketTimeout
public int getSocketTimeout()
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout)
-
getKeepAliveOnBadKeepAliveValueMs
public int getKeepAliveOnBadKeepAliveValueMs()
-
setKeepAliveOnBadKeepAliveValueMs
public void setKeepAliveOnBadKeepAliveValueMs(int keepAliveOnBadKeepAliveValueMs)
-
getUserName
public String getUserName()
-
setUserName
public void setUserName(String userName)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getNtDomain
public String getNtDomain()
-
setNtDomain
public void setNtDomain(String ntDomain)
-
getAuthScheme
public String getAuthScheme()
-
setAuthScheme
public void setAuthScheme(String authScheme)
only basic and ntlm are supported- Parameters:
authScheme-
-
setCredentialsAESEncrypted
public void setCredentialsAESEncrypted(boolean credentialsAESEncrypted) throws TikaConfigException- Throws:
TikaConfigException
-
setDisableContentCompression
public void setDisableContentCompression(boolean disableContentCompression)
-
copy
public HttpClientFactory copy() throws TikaConfigException
- Throws:
TikaConfigException
-
build
public org.apache.http.client.HttpClient build() throws TikaConfigException- Throws:
TikaConfigException
-
getKeepAliveStrategy
public org.apache.http.conn.ConnectionKeepAliveStrategy getKeepAliveStrategy()
-
-