com.aliyun.oss

## 类 ClientConfiguration

- java.lang.Object
- - com.aliyun.oss.ClientConfiguration

- 直接已知子类:
    ClientBuilderConfiguration

      public class ClientConfiguration
      extends Object

  Client configurations for accessing to OSS services.

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected List<String>` | `cnameExcludeList`
    `protected int` | `connectionRequestTimeout`
    `protected int` | `connectionTimeout`
    `protected long` | `connectionTTL`
    `protected boolean` | `crcCheckEnabled`
    `static String` | `DEFAULT_CNAME_EXCLUDE_LIST`
    `static int` | `DEFAULT_CONNECTION_REQUEST_TIMEOUT`
    `static int` | `DEFAULT_CONNECTION_TIMEOUT`
    `static long` | `DEFAULT_CONNECTION_TTL`
    `static long` | `DEFAULT_IDLE_CONNECTION_TIME`
    `static int` | `DEFAULT_MAX_CONNECTIONS`
    `static int` | `DEFAULT_MAX_RETRIES`
    `static int` | `DEFAULT_REQUEST_TIMEOUT`
    `static SignVersion` | `DEFAULT_SIGNATURE_VERSION`
    `static long` | `DEFAULT_SLOW_REQUESTS_THRESHOLD`
    `static int` | `DEFAULT_SOCKET_TIMEOUT`
    `static int` | `DEFAULT_THREAD_POOL_WAIT_TIME`
    `static boolean` | `DEFAULT_USE_REAPER`
    `static String` | `DEFAULT_USER_AGENT`
    `static int` | `DEFAULT_VALIDATE_AFTER_INACTIVITY`
    `protected Map<String,String>` | `defaultHeaders`
    `protected long` | `idleConnectionTime`
    `protected int` | `maxConnections`
    `protected int` | `maxErrorRetry`
    `protected Protocol` | `protocol`
    `protected String` | `proxyDomain`
    `protected String` | `proxyHost`
    `protected String` | `proxyPassword`
    `protected int` | `proxyPort`
    `protected String` | `proxyUsername`
    `protected String` | `proxyWorkstation`
    `protected int` | `requestTimeout`
    `protected boolean` | `requestTimeoutEnabled`
    `protected Lock` | `rlock`
    `protected SignVersion` | `signatureVersion`
    `protected List<RequestSigner>` | `signerHandlers`
    `protected boolean` | `sldEnabled`
    `protected long` | `slowRequestsThreshold`
    `protected int` | `socketTimeout`
    `protected boolean` | `supportCname`
    `protected long` | `tickOffset`
    `protected String` | `userAgent`
    `protected boolean` | `useReaper`

  - ### 构造器概要

    构造器
    构造器和说明
    `ClientConfiguration()`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addDefaultHeader(String key, String value)` Add a default header into the default header list.
    `List<String>` | `getCnameExcludeList()` Gets the immutable excluded CName list----any domain ends with an item in this list will not do Cname resolution.
    `int` | `getConnectionRequestTimeout()` Gets the timeout in millisecond for retrieving an available connection from the connection manager. 0 means infinite and -1 means not defined.
    `int` | `getConnectionTimeout()` Gets the socket connection timeout in millisecond.
    `long` | `getConnectionTTL()` Gets the connection TTL (time to live).
    `Map<String,String>` | `getDefaultHeaders()` Gets the default http headers.
    `HostnameVerifier` | `getHostnameVerifier()` Gets the instance of this interface for hostname verification.
    `long` | `getIdleConnectionTime()` Gets the connection's max idle time.
    `KeyManager[]` | `getKeyManagers()` Gets the KeyManagers are responsible for managing the key material which is used to authenticate the local SSLSocket to its peer.
    `int` | `getMaxConnections()` Gets the max connection count.
    `int` | `getMaxErrorRetry()` Gets the max retry count upon a retryable error.
    `Protocol` | `getProtocol()` Gets the OSS's protocol (HTTP or HTTPS).
    `String` | `getProxyDomain()` Gets the proxy server's domain, which could do the NTLM authentiation (optional).
    `String` | `getProxyHost()` Gets proxy host.
    `String` | `getProxyPassword()` Gets the proxy user password.
    `int` | `getProxyPort()` Gets the proxy host's port.
    `String` | `getProxyUsername()` Gets the proxy user name.
    `String` | `getProxyWorkstation()` Gets the proxy host's NTLM authentication server.
    `int` | `getRequestTimeout()` Gets the timeout value in millisecond.
    `RetryStrategy` | `getRetryStrategy()` Gets the retry strategy
    `SecureRandom` | `getSecureRandom()` Gets the cryptographically strong random number.
    `SignVersion` | `getSignatureVersion()` Gets signature version
    `List<RequestSigner>` | `getSignerHandlers()` Gets signer handlers
    `long` | `getSlowRequestsThreshold()` Sets the slow request's latency threshold.
    `int` | `getSocketTimeout()` Gets the socket timeout in millisecond. 0 means infinite timeout, not recommended.
    `long` | `getTickOffset()` Gets the difference between customized epoch time and local time, in millisecond.
    `String` | `getUserAgent()` Gets the user agent string.
    `int` | `getValidateAfterInactivity()` The connection idle time threshold in millisecond that triggers the validation.
    `X509TrustManager[]` | `getX509TrustManagers()` Gets the instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.
    `boolean` | `isCrcCheckEnabled()` Gets the flag of enabling CRC checksum on upload and download.
    `boolean` | `isRedirectEnable()` Gets the flag of http redirection.
    `boolean` | `isRequestTimeoutEnabled()` Gets the flag of enabling request timeout.
    `boolean` | `isSLDEnabled()` Gets the flag of using SLD (Second Level Domain) style to access the endpoint.
    `boolean` | `isSupportCname()` Gets the flag if supporting Cname in the endpoint.
    `boolean` | `isUseReaper()` Gets the flag of using `IdleConnectionReaper` to manage expired connection.
    `boolean` | `isVerifySSLEnable()` Gets the flag of verifing SSL certificate.
    `void` | `setCnameExcludeList(List<String> cnameExcludeList)` Sets the immutable excluded CName list----any domain ends with an item in this list will not do Cname resolution.
    `void` | `setConnectionRequestTimeout(int connectionRequestTimeout)` Sets the timeout in millisecond for retrieving an available connection from the connection manager.
    `void` | `setConnectionTimeout(int connectionTimeout)` Sets the socket connection timeout in millisecond.
    `void` | `setConnectionTTL(long connectionTTL)` Sets the connection TTL (time to live).
    `void` | `setCrcCheckEnabled(boolean crcCheckEnabled)` Sets the flag of enabling CRC checksum on upload and download.
    `void` | `setDefaultHeaders(Map<String,String> defaultHeaders)` Sets the default http headers.
    `void` | `setHostnameVerifier(HostnameVerifier hostnameVerifier)` Sets instance of this interface for hostname verification.
    `void` | `setIdleConnectionTime(long idleConnectionTime)` Sets the connection's max idle time.
    `void` | `setKeyManagers(KeyManager[] keyManagers)` Sets the key managers are responsible for managing the key material which is used to authenticate the local SSLSocket to its peer.
    `void` | `setMaxConnections(int maxConnections)` Sets the max connection count.
    `void` | `setMaxErrorRetry(int maxErrorRetry)` Sets the max retry count upon a retryable error.
    `void` | `setProtocol(Protocol protocol)` Sets the OSS's protocol (HTTP or HTTPS).
    `void` | `setProxyDomain(String proxyDomain)` Sets the proxy server's domain, which could do the NTLM authentication (optional).
    `void` | `setProxyHost(String proxyHost)` Sets the proxy host.
    `void` | `setProxyPassword(String proxyPassword)` Sets the proxy user password.
    `void` | `setProxyPort(int proxyPort)` Sets proxy port.
    `void` | `setProxyUsername(String proxyUsername)` Sets the proxy user name.
    `void` | `setProxyWorkstation(String proxyWorkstation)` Sets the proxy host's NTLM authentication server(optional, if the proxy server does not require NTLM authentication, then it's not needed).
    `void` | `setRedirectEnable(boolean redirectEnable)` Sets the flag of http redirection.
    `void` | `setRequestTimeout(int requestTimeout)` Sets the timeout value in millisecond.
    `void` | `setRequestTimeoutEnabled(boolean requestTimeoutEnabled)` Gets the flag of enabling request timeout.
    `void` | `setRetryStrategy(RetryStrategy retryStrategy)` Sets the retry strategy.
    `void` | `setSecureRandom(SecureRandom secureRandom)` Sets the cryptographically strong random number.
    `void` | `setSignatureVersion(SignVersion signatureVersion)` Sets signature version for all request.
    `void` | `setSignerHandlers(List<RequestSigner> signerHandlers)` Sets signer handlers using for authentication of the proxy server.
    `ClientConfiguration` | `setSLDEnabled(boolean enabled)` Sets the flag of using SLD (Second Level Domain) style to access the endpoint.
    `void` | `setSlowRequestsThreshold(long slowRequestsThreshold)` Gets the slow request's latency threshold.
    `void` | `setSocketTimeout(int socketTimeout)` Sets the socket timeout in millisecond. 0 means infinite timeout, not recommended.
    `ClientConfiguration` | `setSupportCname(boolean supportCname)` Sets the flag if supporting Cname in the endpoint.
    `void` | `setTickOffset(long epochTicks)` Sets the custom base time.
    `void` | `setUserAgent(String userAgent)` Sets the user agent string.
    `void` | `setUseReaper(boolean useReaper)` Sets the flag of using `IdleConnectionReaper` to manage expired connection.
    `void` | `setVerifySSLEnable(boolean verifySSLEnable)` Sets the flag of verifing SSL certificate.
    `void` | `setX509TrustManagers(X509TrustManager[] x509TrustManagers)` Sets the instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### DEFAULT_USER_AGENT

          public static final String DEFAULT_USER_AGENT

    - #### DEFAULT_MAX_RETRIES

          public static final int DEFAULT_MAX_RETRIES

      另请参阅:
        常量字段值

    - #### DEFAULT_CONNECTION_REQUEST_TIMEOUT

          public static final int DEFAULT_CONNECTION_REQUEST_TIMEOUT

      另请参阅:
        常量字段值

    - #### DEFAULT_CONNECTION_TIMEOUT

          public static final int DEFAULT_CONNECTION_TIMEOUT

      另请参阅:
        常量字段值

    - #### DEFAULT_SOCKET_TIMEOUT

          public static final int DEFAULT_SOCKET_TIMEOUT

      另请参阅:
        常量字段值

    - #### DEFAULT_MAX_CONNECTIONS

          public static final int DEFAULT_MAX_CONNECTIONS

      另请参阅:
        常量字段值

    - #### DEFAULT_CONNECTION_TTL

          public static final long DEFAULT_CONNECTION_TTL

      另请参阅:
        常量字段值

    - #### DEFAULT_IDLE_CONNECTION_TIME

          public static final long DEFAULT_IDLE_CONNECTION_TIME

      另请参阅:
        常量字段值

    - #### DEFAULT_VALIDATE_AFTER_INACTIVITY

          public static final int DEFAULT_VALIDATE_AFTER_INACTIVITY

      另请参阅:
        常量字段值

    - #### DEFAULT_THREAD_POOL_WAIT_TIME

          public static final int DEFAULT_THREAD_POOL_WAIT_TIME

      另请参阅:
        常量字段值

    - #### DEFAULT_REQUEST_TIMEOUT

          public static final int DEFAULT_REQUEST_TIMEOUT

      另请参阅:
        常量字段值

    - #### DEFAULT_SLOW_REQUESTS_THRESHOLD

          public static final long DEFAULT_SLOW_REQUESTS_THRESHOLD

      另请参阅:
        常量字段值

    - #### DEFAULT_USE_REAPER

          public static final boolean DEFAULT_USE_REAPER

      另请参阅:
        常量字段值

    - #### DEFAULT_CNAME_EXCLUDE_LIST

          public static final String DEFAULT_CNAME_EXCLUDE_LIST

      另请参阅:
        常量字段值

    - #### DEFAULT_SIGNATURE_VERSION

          public static final SignVersion DEFAULT_SIGNATURE_VERSION

    - #### userAgent

          protected String userAgent

    - #### maxErrorRetry

          protected int maxErrorRetry

    - #### connectionRequestTimeout

          protected int connectionRequestTimeout

    - #### connectionTimeout

          protected int connectionTimeout

    - #### socketTimeout

          protected int socketTimeout

    - #### maxConnections

          protected int maxConnections

    - #### connectionTTL

          protected long connectionTTL

    - #### useReaper

          protected boolean useReaper

    - #### idleConnectionTime

          protected long idleConnectionTime

    - #### protocol

          protected Protocol protocol

    - #### proxyHost

          protected String proxyHost

    - #### proxyPort

          protected int proxyPort

    - #### proxyUsername

          protected String proxyUsername

    - #### proxyPassword

          protected String proxyPassword

    - #### proxyDomain

          protected String proxyDomain

    - #### proxyWorkstation

          protected String proxyWorkstation

    - #### supportCname

          protected boolean supportCname

    - #### cnameExcludeList

          protected List<String> cnameExcludeList

    - #### rlock

          protected Lock rlock

    - #### sldEnabled

          protected boolean sldEnabled

    - #### requestTimeout

          protected int requestTimeout

    - #### requestTimeoutEnabled

          protected boolean requestTimeoutEnabled

    - #### slowRequestsThreshold

          protected long slowRequestsThreshold

    - #### defaultHeaders

          protected Map<String,String> defaultHeaders

    - #### crcCheckEnabled

          protected boolean crcCheckEnabled

    - #### signerHandlers

          protected List<RequestSigner> signerHandlers

    - #### signatureVersion

          protected SignVersion signatureVersion

    - #### tickOffset

          protected long tickOffset

  - ### 构造器详细资料

    - #### ClientConfiguration

          public ClientConfiguration()

  - ### 方法详细资料

    - #### getUserAgent

          public String getUserAgent()

      Gets the user agent string.
      返回:
        The user agent string.

    - #### setUserAgent

          public void setUserAgent(String userAgent)

      Sets the user agent string.
      参数:
        `userAgent` - The user agent string.

    - #### getProxyHost

          public String getProxyHost()

      Gets proxy host.
      返回:
        The proxy host in string.

    - #### setProxyHost

          public void setProxyHost(String proxyHost)

      Sets the proxy host.
      参数:
        `proxyHost` - The proxy host in string.

    - #### getProxyPort

          public int getProxyPort()

      Gets the proxy host's port.
      返回:
        The proxy host.

    - #### setProxyPort

          public void setProxyPort(int proxyPort)
                            throws ClientException

      Sets proxy port.
      参数:
        `proxyPort` - The proxy port.
      抛出:
        `ClientException`

    - #### getProxyUsername

          public String getProxyUsername()

      Gets the proxy user name.
      返回:
        The user name.

    - #### setProxyUsername

          public void setProxyUsername(String proxyUsername)

      Sets the proxy user name.
      参数:
        `proxyUsername` - The user name.

    - #### getProxyPassword

          public String getProxyPassword()

      Gets the proxy user password.
      返回:
        The proxy user password.

    - #### setProxyPassword

          public void setProxyPassword(String proxyPassword)

      Sets the proxy user password.
      参数:
        `proxyPassword` - The proxy user password.

    - #### getProxyDomain

          public String getProxyDomain()

      Gets the proxy server's domain, which could do the NTLM authentiation (optional).
      返回:
        The proxy domain name.

    - #### setProxyDomain

          public void setProxyDomain(String proxyDomain)

      Sets the proxy server's domain, which could do the NTLM authentication (optional).
      参数:
        `proxyDomain` - The proxy domain name.

    - #### getProxyWorkstation

          public String getProxyWorkstation()

      Gets the proxy host's NTLM authentication server.
      返回:
        The NTLM authentication server name.

    - #### setProxyWorkstation

          public void setProxyWorkstation(String proxyWorkstation)

      Sets the proxy host's NTLM authentication server(optional, if the proxy server does not require NTLM authentication, then it's not needed).
      参数:
        `proxyWorkstation` - The proxy host's NTLM authentication server name.

    - #### getMaxConnections

          public int getMaxConnections()

      Gets the max connection count.
      返回:
        The max connection count. By default it's 1024.

    - #### setMaxConnections

          public void setMaxConnections(int maxConnections)

      Sets the max connection count.
      参数:
        `maxConnections` - The max connection count.

    - #### getSocketTimeout

          public int getSocketTimeout()

      Gets the socket timeout in millisecond. 0 means infinite timeout, not recommended.
      返回:
        The socket timeout in millisecond.

    - #### setSocketTimeout

          public void setSocketTimeout(int socketTimeout)

      Sets the socket timeout in millisecond. 0 means infinite timeout, not recommended.
      参数:
        `socketTimeout` - The socket timeout in millisecond.

    - #### getConnectionTimeout

          public int getConnectionTimeout()

      Gets the socket connection timeout in millisecond.
      返回:
        The socket connection timeout in millisecond.

    - #### setConnectionTimeout

          public void setConnectionTimeout(int connectionTimeout)

      Sets the socket connection timeout in millisecond.
      参数:
        `connectionTimeout` - The socket connection timeout in millisecond.

    - #### getConnectionRequestTimeout

          public int getConnectionRequestTimeout()

      Gets the timeout in millisecond for retrieving an available connection from the connection manager. 0 means infinite and -1 means not defined. By default it's -1.
      返回:
        The timeout in millisecond.

    - #### setConnectionRequestTimeout

          public void setConnectionRequestTimeout(int connectionRequestTimeout)

      Sets the timeout in millisecond for retrieving an available connection from the connection manager.
      参数:
        `connectionRequestTimeout` - The timeout in millisecond.

    - #### getMaxErrorRetry

          public int getMaxErrorRetry()

      Gets the max retry count upon a retryable error. By default it's 3.
      返回:
        The max retry count.

    - #### setMaxErrorRetry

          public void setMaxErrorRetry(int maxErrorRetry)

      Sets the max retry count upon a retryable error. By default it's 3.
      参数:
        `maxErrorRetry` - The max retry count.

    - #### getConnectionTTL

          public long getConnectionTTL()

      Gets the connection TTL (time to live). Http connection is cached by the connection manager with a TTL.
      返回:
        The connection TTL in millisecond.

    - #### setConnectionTTL

          public void setConnectionTTL(long connectionTTL)

      Sets the connection TTL (time to live). Http connection is cached by the connection manager with a TTL.
      参数:
        `connectionTTL` - The connection TTL in millisecond.

    - #### isUseReaper

          public boolean isUseReaper()

      Gets the flag of using `IdleConnectionReaper` to manage expired connection.

    - #### setUseReaper

          public void setUseReaper(boolean useReaper)

      Sets the flag of using `IdleConnectionReaper` to manage expired connection.

    - #### getIdleConnectionTime

          public long getIdleConnectionTime()

      Gets the connection's max idle time. If a connection has been idle for more than this number, it would be closed.
      返回:
        The connection's max idle time in millisecond.

    - #### setIdleConnectionTime

          public void setIdleConnectionTime(long idleConnectionTime)

      Sets the connection's max idle time. If a connection has been idle for more than this number, it would be closed.
      参数:
        `idleConnectionTime` - The connection's max idle time in millisecond.

    - #### getProtocol

          public Protocol getProtocol()

      Gets the OSS's protocol (HTTP or HTTPS).

    - #### setProtocol

          public void setProtocol(Protocol protocol)

      Sets the OSS's protocol (HTTP or HTTPS).

    - #### getCnameExcludeList

          public List<String> getCnameExcludeList()

      Gets the immutable excluded CName list----any domain ends with an item in this list will not do Cname resolution.
      返回:
        The excluded CName list, immutable.

    - #### setCnameExcludeList

          public void setCnameExcludeList(List<String> cnameExcludeList)

      Sets the immutable excluded CName list----any domain ends with an item in this list will not do Cname resolution.
      参数:
        `cnameExcludeList` - The excluded CName list, immutable.

    - #### isSupportCname

          public boolean isSupportCname()

      Gets the flag if supporting Cname in the endpoint. By default it's true.
      返回:
        True if supporting Cname; False if not.

    - #### setSupportCname

          public ClientConfiguration setSupportCname(boolean supportCname)

      Sets the flag if supporting Cname in the endpoint. By default it's true.

      If this value is set true, when building a canonical url, the host would be checked against the Cname excluded list. If that host is found in the list, then it's treated as non-CName and accessed as TLD (third level domain). If the host is found, then it's thought as CName. If this value is set false, then always uses TLD to access the endpoint.

      参数:
        `supportCname` - The flag if supporting CName.

    - #### isSLDEnabled

          public boolean isSLDEnabled()

      Gets the flag of using SLD (Second Level Domain) style to access the endpoint. By default it's false. When using SLD, then the bucket endpoint would be: http://host/bucket. Otherwise, it will be http://bucket.host
      返回:
        True if it's enabled; False if it's disabled.

    - #### setSLDEnabled

          public ClientConfiguration setSLDEnabled(boolean enabled)

      Sets the flag of using SLD (Second Level Domain) style to access the endpoint. By default it's false.
      参数:
        `enabled` - True if it's enabled; False if it's disabled.

    - #### getValidateAfterInactivity

          public int getValidateAfterInactivity()

      The connection idle time threshold in millisecond that triggers the validation. By default it's 2000.
      返回:
        The connection idle time threshold.

    - #### isRequestTimeoutEnabled

          public boolean isRequestTimeoutEnabled()

      Gets the flag of enabling request timeout. By default it's disabled.
      返回:
        true enabled; false disabled.

    - #### setRequestTimeoutEnabled

          public void setRequestTimeoutEnabled(boolean requestTimeoutEnabled)

      Gets the flag of enabling request timeout. By default it's disabled.
      参数:
        `requestTimeoutEnabled` - true to enable; false to disable.

    - #### setRequestTimeout

          public void setRequestTimeout(int requestTimeout)

      Sets the timeout value in millisecond. By default it's 5 min.

    - #### getRequestTimeout

          public int getRequestTimeout()

      Gets the timeout value in millisecond.

    - #### getSlowRequestsThreshold

          public long getSlowRequestsThreshold()

      Sets the slow request's latency threshold. If a request's latency is more than it, the request will be logged. By default the threshold is 5 min.

    - #### setSlowRequestsThreshold

          public void setSlowRequestsThreshold(long slowRequestsThreshold)

      Gets the slow request's latency threshold. If a request's latency is more than it, the request will be logged.

    - #### getDefaultHeaders

          public Map<String,String> getDefaultHeaders()

      Gets the default http headers. All these headers would be automatically added in every request. And if a header is also specified in the request, the default one will be overwritten.

    - #### setDefaultHeaders

          public void setDefaultHeaders(Map<String,String> defaultHeaders)

      Sets the default http headers. All these headers would be automatically added in every request. And if a header is also specified in the request, the default one will be overwritten.
      参数:
        `defaultHeaders` - Default http headers.

    - #### addDefaultHeader

          public void addDefaultHeader(String key,
                              String value)

      Add a default header into the default header list.
      参数:
        `key` - The default header name.
        `value` - The default header value.

    - #### isCrcCheckEnabled

          public boolean isCrcCheckEnabled()

      Gets the flag of enabling CRC checksum on upload and download. By default it's true.
      返回:
        true enable CRC;false disable CRC.

    - #### setCrcCheckEnabled

          public void setCrcCheckEnabled(boolean crcCheckEnabled)

      Sets the flag of enabling CRC checksum on upload and download. By default it's true.
      参数:
        `crcCheckEnabled` - True to enable CRC; False to disable CRC.

    - #### getSignerHandlers

          public List<RequestSigner> getSignerHandlers()

      Gets signer handlers
      返回:
        signer handlers

    - #### setSignerHandlers

          public void setSignerHandlers(List<RequestSigner> signerHandlers)

      Sets signer handlers using for authentication of the proxy server.
      参数:
        `signerHandlers` -

    - #### getSignatureVersion

          public SignVersion getSignatureVersion()

      Gets signature version
      返回:
        signature version

    - #### setSignatureVersion

          public void setSignatureVersion(SignVersion signatureVersion)

      Sets signature version for all request.
      参数:
        `signatureVersion` -

    - #### getTickOffset

          public long getTickOffset()

      Gets the difference between customized epoch time and local time, in millisecond.
      返回:
        tick Offset

    - #### setTickOffset

          public void setTickOffset(long epochTicks)

      Sets the custom base time. OSS's token validation logic depends on the time. It requires that there's no more than 15 min time difference between client and OSS server. This API calculates the difference between local time to epoch time. Later one other APIs use this difference to offset the local time before sending request to OSS.
      参数:
        `epochTicks` - Custom Epoch ticks (in millisecond).

    - #### getRetryStrategy

          public RetryStrategy getRetryStrategy()

      Gets the retry strategy
      返回:
        `RetryStrategy` object.

    - #### setRetryStrategy

          public void setRetryStrategy(RetryStrategy retryStrategy)

      Sets the retry strategy.
      参数:
        `retryStrategy` - The retryStrategy is used to check whether to retry request or not. If it has been specified, the client will prefer this retryStrategy than its private strategy `DefaultRetryStrategy`.

    - #### isRedirectEnable

          public boolean isRedirectEnable()

      Gets the flag of http redirection.
      返回:
        the flag of http redirection.

    - #### setRedirectEnable

          public void setRedirectEnable(boolean redirectEnable)

      Sets the flag of http redirection.
      参数:
        `redirectEnable` - Determines whether redirects should be handled automatically.

    - #### isVerifySSLEnable

          public boolean isVerifySSLEnable()

      Gets the flag of verifing SSL certificate. By default it's true.
      返回:
        true verify SSL certificate;false ignore SSL certificate.

    - #### setVerifySSLEnable

          public void setVerifySSLEnable(boolean verifySSLEnable)

      Sets the flag of verifing SSL certificate.
      参数:
        `verifySSLEnable` - True to verify SSL certificate; False to ignore SSL certificate.

    - #### getKeyManagers

          public KeyManager[] getKeyManagers()

      Gets the KeyManagers are responsible for managing the key material which is used to authenticate the local SSLSocket to its peer.
      返回:
        the key managers.

    - #### setKeyManagers

          public void setKeyManagers(KeyManager[] keyManagers)

      Sets the key managers are responsible for managing the key material which is used to authenticate the local SSLSocket to its peer.
      参数:
        `keyManagers` - the key managers

    - #### getX509TrustManagers

          public X509TrustManager[] getX509TrustManagers()

      Gets the instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.
      返回:
        the x509 trust managers .

    - #### setX509TrustManagers

          public void setX509TrustManagers(X509TrustManager[] x509TrustManagers)

      Sets the instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.
      参数:
        `x509TrustManagers` - x509 trust managers

    - #### getSecureRandom

          public SecureRandom getSecureRandom()

      Gets the cryptographically strong random number.
      返回:
        random number.

    - #### setSecureRandom

          public void setSecureRandom(SecureRandom secureRandom)

      Sets the cryptographically strong random number.
      参数:
        `secureRandom` - the cryptographically strong random number

    - #### getHostnameVerifier

          public HostnameVerifier getHostnameVerifier()

      Gets the instance of this interface for hostname verification.
      返回:
        the hostname verification instance.

    - #### setHostnameVerifier

          public void setHostnameVerifier(HostnameVerifier hostnameVerifier)

      Sets instance of this interface for hostname verification.
      参数:
        `hostnameVerifier` - the hostname verification instance

Copyright © 2020. All Rights Reserved.