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 Details

  • Constructor Details

    • HttpClientFactory

      public HttpClientFactory()
  • Method Details

    • getProxyHost

      public String getProxyHost()
    • setProxyHost

      public void setProxyHost(String proxyHost)
    • getProxyPort

      public int getProxyPort()
    • setProxyPort

      public void setProxyPort(int proxyPort)
    • getAllowedHostsForRedirect

      public Set<String> getAllowedHostsForRedirect()
    • 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()