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 String
AES_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.HttpClient
build()
HttpClientFactory
copy()
Set<String>
getAllowedHostsForRedirect()
String
getAuthScheme()
int
getConnectTimeout()
int
getKeepAliveOnBadKeepAliveValueMs()
org.apache.http.conn.ConnectionKeepAliveStrategy
getKeepAliveStrategy()
int
getMaxConnections()
int
getMaxConnectionsPerRoute()
String
getNtDomain()
String
getPassword()
String
getProxyHost()
int
getProxyPort()
int
getRequestTimeout()
int
getSocketTimeout()
String
getUserName()
void
setAllowedHostsForRedirect(Set<String> allowedHostsForRedirect)
void
setAuthScheme(String authScheme)
only basic and ntlm are supportedvoid
setConnectTimeout(int connectTimeout)
void
setCredentialsAESEncrypted(boolean credentialsAESEncrypted)
void
setDisableContentCompression(boolean disableContentCompression)
void
setKeepAliveOnBadKeepAliveValueMs(int keepAliveOnBadKeepAliveValueMs)
void
setMaxConnections(int maxConnections)
void
setMaxConnectionsPerRoute(int maxConnectionsPerRoute)
void
setNtDomain(String ntDomain)
void
setPassword(String password)
void
setProxyHost(String proxyHost)
void
setProxyPort(int proxyPort)
void
setRequestTimeout(int requestTimeout)
void
setSocketTimeout(int socketTimeout)
void
setUserName(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()
-
-