public class HttpClientFactory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpClientFactory.NonBlockingHttpParams |
static class |
HttpClientFactory.NonBlockingHttpParamsFactory
An extension of the DefaultHttpParamsFactory that uses a RRW lock pattern rather than
full synchronization around the parameter CRUD - to avoid locking on many reads.
|
static class |
HttpClientFactory.SecureCommsType |
Constructor and Description |
---|
HttpClientFactory() |
HttpClientFactory(HttpClientFactory.SecureCommsType secureCommsType,
SSLEncryptionParameters sslEncryptionParameters,
KeyResourceLoader keyResourceLoader,
KeyStoreParameters keyStoreParameters,
MD5EncryptionParameters encryptionParameters,
String host,
int port,
int sslPort,
int maxTotalConnections,
int maxHostConnections,
int socketTimeout) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.commons.httpclient.HttpClient |
constructHttpClient() |
protected AlfrescoHttpClient |
getAlfrescoHttpClient() |
protected AlfrescoHttpClient |
getAlfrescoHttpsClient() |
protected org.apache.commons.httpclient.HttpClient |
getDefaultHttpClient() |
protected org.apache.commons.httpclient.HttpClient |
getDefaultHttpClient(String httpHost,
int httpPort) |
String |
getHost() |
org.apache.commons.httpclient.HttpClient |
getHttpClient() |
org.apache.commons.httpclient.HttpClient |
getHttpClient(String host,
int port) |
protected org.apache.commons.httpclient.HttpClient |
getHttpsClient() |
protected org.apache.commons.httpclient.HttpClient |
getHttpsClient(String httpsHost,
int httpsPort) |
int |
getMaxHostConnections() |
int |
getMaxTotalConnections() |
protected org.apache.commons.httpclient.HttpClient |
getMD5HttpClient(String host,
int port) |
int |
getPort() |
AlfrescoHttpClient |
getRepoClient(String host,
int port) |
void |
init() |
boolean |
isSSL() |
void |
setConnectionTimeout(int connectionTimeout)
Attempts to connect to a server will timeout after this period (millis).
|
void |
setEncryptionParameters(MD5EncryptionParameters encryptionParameters) |
void |
setHost(String host) |
void |
setKeyResourceLoader(KeyResourceLoader keyResourceLoader) |
void |
setKeyStoreParameters(KeyStoreParameters keyStoreParameters) |
void |
setMaxHostConnections(int maxHostConnections) |
void |
setMaxTotalConnections(int maxTotalConnections) |
void |
setPort(int port) |
void |
setSecureCommsType(String type) |
void |
setSSLEncryptionParameters(SSLEncryptionParameters sslEncryptionParameters) |
void |
setSslPort(int sslPort) |
public HttpClientFactory()
public HttpClientFactory(HttpClientFactory.SecureCommsType secureCommsType, SSLEncryptionParameters sslEncryptionParameters, KeyResourceLoader keyResourceLoader, KeyStoreParameters keyStoreParameters, MD5EncryptionParameters encryptionParameters, String host, int port, int sslPort, int maxTotalConnections, int maxHostConnections, int socketTimeout)
public void init()
public void setHost(String host)
public String getHost()
public void setPort(int port)
public int getPort()
public void setSslPort(int sslPort)
public boolean isSSL()
public void setSecureCommsType(String type)
public void setSSLEncryptionParameters(SSLEncryptionParameters sslEncryptionParameters)
public void setKeyStoreParameters(KeyStoreParameters keyStoreParameters)
public void setEncryptionParameters(MD5EncryptionParameters encryptionParameters)
public void setKeyResourceLoader(KeyResourceLoader keyResourceLoader)
public int getMaxTotalConnections()
public void setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections
- the maxTotalConnections to setpublic int getMaxHostConnections()
public void setMaxHostConnections(int maxHostConnections)
maxHostConnections
- the maxHostConnections to setpublic void setConnectionTimeout(int connectionTimeout)
connectionTimeout
- time in millis.protected org.apache.commons.httpclient.HttpClient constructHttpClient()
protected org.apache.commons.httpclient.HttpClient getHttpsClient()
protected org.apache.commons.httpclient.HttpClient getHttpsClient(String httpsHost, int httpsPort)
protected org.apache.commons.httpclient.HttpClient getDefaultHttpClient()
protected org.apache.commons.httpclient.HttpClient getDefaultHttpClient(String httpHost, int httpPort)
protected AlfrescoHttpClient getAlfrescoHttpsClient()
protected AlfrescoHttpClient getAlfrescoHttpClient()
protected org.apache.commons.httpclient.HttpClient getMD5HttpClient(String host, int port)
public AlfrescoHttpClient getRepoClient(String host, int port)
public org.apache.commons.httpclient.HttpClient getHttpClient()
public org.apache.commons.httpclient.HttpClient getHttpClient(String host, int port)
Copyright © 2005–2018 Alfresco Software. All rights reserved.