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!

TLS certificates and hostnames are verified against the JVM trust store unless setVerifySsl(boolean) is called with false, which accepts any certificate and skips the hostname check.

  • 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)
    • getMaxConnectionsPerRoute

      public int getMaxConnectionsPerRoute()
    • setMaxConnectionsPerRoute

      public void setMaxConnectionsPerRoute(int maxConnectionsPerRoute)
    • getMaxConnections

      public int getMaxConnections()
    • setMaxConnections

      public void setMaxConnections(int maxConnections)
    • getRequestTimeoutMillis

      public int getRequestTimeoutMillis()
    • setRequestTimeoutMillis

      public void setRequestTimeoutMillis(int requestTimeoutMillis)
    • getConnectTimeoutMillis

      public int getConnectTimeoutMillis()
    • setConnectTimeoutMillis

      public void setConnectTimeoutMillis(int connectTimeoutMillis)
    • getSocketTimeoutMillis

      public int getSocketTimeoutMillis()
    • setSocketTimeoutMillis

      public void setSocketTimeoutMillis(int socketTimeoutMillis)
    • 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)
    • isVerifySsl

      public boolean isVerifySsl()
    • setVerifySsl

      public void setVerifySsl(boolean verifySsl)
    • 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()