Class HttpClientFactory


  • public class HttpClientFactory
    extends java.lang.Object
    A factory to create HttpClients and AlfrescoHttpClients based on the setting of the 'secureCommsType' property.
    Since:
    4.0
    • Method Detail

      • init

        public void init()
      • setHost

        public void setHost​(java.lang.String host)
      • getHost

        public java.lang.String getHost()
      • setPort

        public void setPort​(int port)
      • getPort

        public int getPort()
      • setSslPort

        public void setSslPort​(int sslPort)
      • isSSL

        public boolean isSSL()
      • setSecureCommsType

        public void setSecureCommsType​(java.lang.String type)
      • setSSLEncryptionParameters

        public void setSSLEncryptionParameters​(SSLEncryptionParameters sslEncryptionParameters)
      • setKeyStoreParameters

        public void setKeyStoreParameters​(KeyStoreParameters keyStoreParameters)
      • setKeyResourceLoader

        public void setKeyResourceLoader​(KeyResourceLoader keyResourceLoader)
      • getMaxTotalConnections

        public int getMaxTotalConnections()
        Returns:
        the maxTotalConnections
      • setMaxTotalConnections

        public void setMaxTotalConnections​(int maxTotalConnections)
        Parameters:
        maxTotalConnections - the maxTotalConnections to set
      • getMaxHostConnections

        public int getMaxHostConnections()
        Returns:
        the maxHostConnections
      • setMaxHostConnections

        public void setMaxHostConnections​(int maxHostConnections)
        Parameters:
        maxHostConnections - the maxHostConnections to set
      • setConnectionTimeout

        public void setConnectionTimeout​(int connectionTimeout)
        Attempts to connect to a server will timeout after this period (millis). Default is zero (the timeout is not used).
        Parameters:
        connectionTimeout - time in millis.
      • constructHttpClient

        protected org.apache.commons.httpclient.HttpClient constructHttpClient()
      • getHttpsClient

        protected org.apache.commons.httpclient.HttpClient getHttpsClient()
      • getHttpsClient

        protected org.apache.commons.httpclient.HttpClient getHttpsClient​(java.lang.String httpsHost,
                                                                          int httpsPort)
      • getDefaultHttpClient

        protected org.apache.commons.httpclient.HttpClient getDefaultHttpClient()
      • getDefaultHttpClient

        protected org.apache.commons.httpclient.HttpClient getDefaultHttpClient​(java.lang.String httpHost,
                                                                                int httpPort)
      • getMD5HttpClient

        protected org.apache.commons.httpclient.HttpClient getMD5HttpClient​(java.lang.String host,
                                                                            int port)
      • getRepoClient

        public AlfrescoHttpClient getRepoClient​(java.lang.String host,
                                                int port)
      • getHttpClient

        public org.apache.commons.httpclient.HttpClient getHttpClient()
      • getHttpClient

        public org.apache.commons.httpclient.HttpClient getHttpClient​(java.lang.String host,
                                                                      int port)