public class ClientConfiguration
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
ClientConfiguration.NetworkPolicy |
构造器和说明 |
---|
ClientConfiguration()
Constructor
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Boolean |
getCachable() |
int |
getConnectionTimeout()
Gets the connection timeout in milliseconds
|
ClientConfiguration.NetworkPolicy |
getConnectType() |
java.util.List<java.lang.String> |
getCustomCnameExcludeList()
Gets the immutable CName excluded list.
|
static ClientConfiguration |
getDefaultConf()
Gets the default configuration instance
|
int |
getMaxConcurrentRequest()
Gets the max concurrent request count
|
int |
getMaxErrorRetry()
Gets the max retry count after the recoverable failure.
|
java.lang.String |
getProxyHost() |
int |
getProxyPort() |
int |
getSocketTimeout()
Gets the socket timeout in milliseconds
0 means infinite (not recommended)
|
void |
setCachable(java.lang.Boolean cachable) |
void |
setConnectionTimeout(int connectionTimeout)
Sets the connection timeout in milliseconds
|
void |
setConnectType(ClientConfiguration.NetworkPolicy connectType) |
void |
setCustomCnameExcludeList(java.util.List<java.lang.String> customCnameExcludeList)
Sets CNAME excluded list
|
void |
setMaxConcurrentRequest(int maxConcurrentRequest)
Sets the max concurrent request count
|
void |
setMaxErrorRetry(int maxErrorRetry)
Sets the max retry count after the recoverable failure.
|
void |
setProxyHost(java.lang.String proxyHost) |
void |
setProxyPort(int proxyPort) |
void |
setSocketTimeout(int socketTimeout)
Gets the socket timeout in milliseconds
0 means infinite (not recommended)
|
public static ClientConfiguration getDefaultConf()
public int getMaxConcurrentRequest()
public void setMaxConcurrentRequest(int maxConcurrentRequest)
maxConcurrentRequest
- The max HTTP request countpublic int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
socketTimeout
- the socket timeout in millisecondspublic int getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout)
connectionTimeout
- The connection timeout in millisecondspublic int getMaxErrorRetry()
public void setMaxErrorRetry(int maxErrorRetry)
maxErrorRetry
- The max retry count after the recoverable failure.public void setCustomCnameExcludeList(java.util.List<java.lang.String> customCnameExcludeList)
customCnameExcludeList
- CNAME excluded listpublic java.util.List<java.lang.String> getCustomCnameExcludeList()
public java.lang.String getProxyHost()
public void setProxyHost(java.lang.String proxyHost)
public int getProxyPort()
public void setProxyPort(int proxyPort)
public java.lang.Boolean getCachable()
public void setCachable(java.lang.Boolean cachable)
public ClientConfiguration.NetworkPolicy getConnectType()
public void setConnectType(ClientConfiguration.NetworkPolicy connectType)