public class ClientConfiguration
extends java.lang.Object
构造器和说明 |
---|
ClientConfiguration()
Constructor
|
限定符和类型 | 方法和说明 |
---|---|
int |
getConnectionTimeout()
Gets the connection timeout in milliseconds
|
java.util.List<java.lang.String> |
getCustomCnameExcludeList()
Gets the immutable CName excluded list.
|
java.lang.String |
getCustomUserMark() |
static ClientConfiguration |
getDefaultConf()
Gets the default configuration instance
|
HttpProtocol |
getHttpProtocol() |
java.lang.String |
getIpWithHeader() |
int |
getMaxConcurrentRequest()
Gets the max concurrent request count
|
int |
getMaxErrorRetry()
Gets the max retry count after the recoverable failure.
|
long |
getMaxLogSize() |
okhttp3.OkHttpClient |
getOkHttpClient() |
java.lang.String |
getProxyHost() |
int |
getProxyPort() |
int |
getSocketTimeout()
Gets the socket timeout in milliseconds
0 means infinite (not recommended)
|
boolean |
isCheckCRC64() |
boolean |
isCustomPathPrefixEnable()
Gets the flag of using custom path prefix to access the
endpoint.
|
boolean |
isFollowRedirectsEnable()
Gets the flag of allow the redirection with a modified request
|
boolean |
isHttpDnsEnable() |
boolean |
isPathStyleAccessEnable()
Gets the flag of using Second Level Domain style to access the
endpoint.
|
void |
setCheckCRC64(boolean checkCRC64)
set check file with CRC64
|
void |
setConnectionTimeout(int connectionTimeout)
Sets the connection timeout in milliseconds
|
void |
setCustomCnameExcludeList(java.util.List<java.lang.String> customCnameExcludeList)
Sets CNAME excluded list
|
void |
setCustomPathPrefixEnable(boolean customPathPrefixEnable)
Sets the flag of using custom path prefix to access the
endpoint.
|
void |
setFollowRedirectsEnable(boolean followRedirectsEnable)
Set whether to allow the redirection with a modified request
|
void |
setHttpDnsEnable(boolean httpdnsEnable) |
void |
setHttpProtocol(HttpProtocol httpProtocol)
set http protocal to use when sending requests to OSS
|
void |
setIpWithHeader(java.lang.String ipWithHeader) |
void |
setMaxConcurrentRequest(int maxConcurrentRequest)
Sets the max concurrent request count
|
void |
setMaxErrorRetry(int maxErrorRetry)
Sets the max retry count after the recoverable failure.
|
void |
setMaxLogSize(long max_log_size)
set max log file size default 5mb
|
void |
setOkHttpClient(okhttp3.OkHttpClient okHttpClient) |
void |
setPathStyleAccessEnable(boolean pathStyleAccessEnable)
Sets the flag of using Second Level Domain style to access the
endpoint.
|
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)
|
void |
setUserAgentMark(java.lang.String mark) |
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 long getMaxLogSize()
public void setMaxLogSize(long max_log_size)
max_log_size
- public int getMaxErrorRetry()
public void setMaxErrorRetry(int maxErrorRetry)
maxErrorRetry
- The max retry count after the recoverable failure.public java.util.List<java.lang.String> getCustomCnameExcludeList()
public void setCustomCnameExcludeList(java.util.List<java.lang.String> customCnameExcludeList)
customCnameExcludeList
- CNAME excluded listpublic java.lang.String getProxyHost()
public void setProxyHost(java.lang.String proxyHost)
public int getProxyPort()
public void setProxyPort(int proxyPort)
public java.lang.String getCustomUserMark()
public void setUserAgentMark(java.lang.String mark)
public boolean isHttpDnsEnable()
public void setHttpDnsEnable(boolean httpdnsEnable)
public boolean isCheckCRC64()
public void setCheckCRC64(boolean checkCRC64)
checkCRC64
- public java.lang.String getIpWithHeader()
public void setIpWithHeader(java.lang.String ipWithHeader)
public boolean isPathStyleAccessEnable()
public void setPathStyleAccessEnable(boolean pathStyleAccessEnable)
pathStyleAccessEnable
- True if it's enabled; False if it's disabled.public boolean isCustomPathPrefixEnable()
public void setCustomPathPrefixEnable(boolean customPathPrefixEnable)
customPathPrefixEnable
- True if it's enabled; False if it's disabled.public boolean isFollowRedirectsEnable()
public void setFollowRedirectsEnable(boolean followRedirectsEnable)
followRedirectsEnable
- True if it's enabled; False if it's disabled.public okhttp3.OkHttpClient getOkHttpClient()
public void setOkHttpClient(okhttp3.OkHttpClient okHttpClient)
public HttpProtocol getHttpProtocol()
public void setHttpProtocol(HttpProtocol httpProtocol)