类 ObsConfiguration

java.lang.Object
cn.warpin.thirdPart.huawei.obs.obs.services.ObsConfiguration
所有已实现的接口:
Cloneable
直接已知子类:
ExtObsConfiguration

public class ObsConfiguration extends Object implements Cloneable
Configuration parameters of ObsClient
  • 字段详细资料

    • connectionTimeout

      private int connectionTimeout
    • idleConnectionTime

      private int idleConnectionTime
    • maxIdleConnections

      private int maxIdleConnections
    • maxConnections

      private int maxConnections
    • maxErrorRetry

      private int maxErrorRetry
    • socketTimeout

      private int socketTimeout
    • endPoint

      private String endPoint
    • endpointHttpPort

      private int endpointHttpPort
    • endpointHttpsPort

      private int endpointHttpsPort
    • httpsOnly

      private boolean httpsOnly
    • pathStyle

      private boolean pathStyle
    • httpProxy

      private HttpProxyConfiguration httpProxy
    • uploadStreamRetryBufferSize

      private int uploadStreamRetryBufferSize
    • validateCertificate

      private boolean validateCertificate
    • verifyResponseContentType

      private boolean verifyResponseContentType
    • readBufferSize

      private int readBufferSize
    • writeBufferSize

      private int writeBufferSize
    • keyManagerFactory

      private KeyManagerFactory keyManagerFactory
    • trustManagerFactory

      private TrustManagerFactory trustManagerFactory
    • isStrictHostnameVerification

      private boolean isStrictHostnameVerification
    • authType

      private AuthTypeEnum authType
    • localAuthTypeCacheCapacity

      private int localAuthTypeCacheCapacity
    • secureRandom

      private SecureRandom secureRandom
    • signatString

      private String signatString
    • defaultBucketLocation

      private String defaultBucketLocation
    • bufferSize

      private int bufferSize
    • socketWriteBufferSize

      private int socketWriteBufferSize
    • socketReadBufferSize

      private int socketReadBufferSize
    • isNio

      private boolean isNio
    • useReaper

      private boolean useReaper
    • keepAlive

      private boolean keepAlive
    • connectionRequestTimeout

      private int connectionRequestTimeout
    • authTypeNegotiation

      private boolean authTypeNegotiation
    • cname

      private boolean cname
    • delimiter

      private String delimiter
    • sslProvider

      private String sslProvider
    • httpProtocolType

      private HttpProtocolTypeEnum httpProtocolType
    • httpDispatcher

      private okhttp3.Dispatcher httpDispatcher
    • customizedDnsImpl

      private okhttp3.Dns customizedDnsImpl
    • xmlDocumentBuilderFactoryClass

      private String xmlDocumentBuilderFactoryClass
  • 构造器详细资料

    • ObsConfiguration

      public ObsConfiguration()
      Constructor
  • 方法详细资料

    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(String delimiter)
      Set folder isolators to slashes.
      参数:
      delimiter - Folder isolator
    • getSignatString

      @Deprecated public String getSignatString()
      已过时。
    • setSignatString

      @Deprecated public void setSignatString(String signatString)
      已过时。
    • getDefaultBucketLocation

      @Deprecated public String getDefaultBucketLocation()
      已过时。
    • setDefaultBucketLocation

      @Deprecated public void setDefaultBucketLocation(String defaultBucketLocation)
      已过时。
    • getBufferSize

      @Deprecated public int getBufferSize()
      已过时。
    • setBufferSize

      @Deprecated public void setBufferSize(int bufferSize)
      已过时。
    • isDisableDnsBucket

      public boolean isDisableDnsBucket()
      Check whether path-style access to OBS is enabled. "true" indicates that path-style access is enabled while "false" (default) indicates virtual hosted-style access is enabled. Note: If the path-style access is enabled, new bucket features of OBS 3.0 are not supported.
      返回:
      Whether to enable path-style access to OBS.
    • setDisableDnsBucket

      public void setDisableDnsBucket(boolean disableDns)
      Specify whether to enable path-style access to OBS. "true" indicates that path-style access is enabled while "false" (default) indicates that virtual hosted-style access is enabled. Note: If the path-style access is enabled, new bucket features of OBS 3.0 are not supported.
      参数:
      disableDns - Whether to enable path-style access to OBS.
    • getSocketReadBufferSize

      public int getSocketReadBufferSize()
      Obtain the size (bytes) of the socket receive buffer, corresponding to the "java.net.SocketOptions.SO_RVCBUF" parameter. The default value is "-1", indicating that the size is not set.
      返回:
      Socket receive buffer size
    • setSocketReadBufferSize

      public void setSocketReadBufferSize(int socketReadBufferSize)
      Set the size (bytes) of the socket receive buffer, corresponding to the "java.net.SocketOptions.SO_RVCBUF" parameter. The default value is "-1", indicating that the size is not set.
      参数:
      socketReadBufferSize - Socket receive buffer size
    • getSocketWriteBufferSize

      public int getSocketWriteBufferSize()
      Obtain the size (bytes) of the socket send buffer, corresponding to the "java.net.SocketOptions.SO_SNDBUF" parameter. The default value is "-1", indicating that the size is not set.
      返回:
      socketSocket send buffer size
    • setSocketWriteBufferSize

      public void setSocketWriteBufferSize(int socketWriteBufferSize)
      Set the size (bytes) of the socket send buffer (in bytes), corresponding to the "java.net.SocketOptions.SO_SNDBUF" parameter. The default value is "-1", indicating that the size is not set.
      参数:
      socketWriteBufferSize - socket Socket send buffer size
    • getConnectionRequestTimeout

      @Deprecated public int getConnectionRequestTimeout()
      已过时。
    • setConnectionRequestTimeout

      @Deprecated public void setConnectionRequestTimeout(int connectionRequestTimeout)
      已过时。
    • disableNio

      @Deprecated public void disableNio()
      已过时。
    • enableNio

      @Deprecated public void enableNio()
      已过时。
    • isNio

      @Deprecated public boolean isNio()
      已过时。
    • isUseReaper

      @Deprecated public boolean isUseReaper()
      已过时。
    • setUseReaper

      @Deprecated public void setUseReaper(boolean useReaper)
      已过时。
    • getKeyManagerFactory

      public KeyManagerFactory getKeyManagerFactory()
      Obtain the factory for generating the "KeyManager" array.
      返回:
      Factory for generating the "KeyManager" array
    • setKeyManagerFactory

      public void setKeyManagerFactory(KeyManagerFactory keyManagerFactory)
      Set the factory for generating the "KeyManager" array.
      参数:
      keyManagerFactory - Factory for generating the "KeyManager" array
    • getTrustManagerFactory

      public TrustManagerFactory getTrustManagerFactory()
      Obtain the factory for generating the "TrustManager" array.
      返回:
      Factory for generating the "TrustManager" array
    • setTrustManagerFactory

      public void setTrustManagerFactory(TrustManagerFactory trustManagerFactory)
      Set the factory for generating the "TrustManager" array.
      参数:
      trustManagerFactory - Factory for generating the "TrustManager" array
    • isStrictHostnameVerification

      public boolean isStrictHostnameVerification()
      Obtain the identifier specifying whether to verify the domain name ("false" by default).
      返回:
      Identifier specifying whether to verify the domain name
    • setIsStrictHostnameVerification

      public void setIsStrictHostnameVerification(boolean isStrictHostnameVerification)
      Set the identifier specifying whether to verify the domain name.
      参数:
      isStrictHostnameVerification - Identifier specifying whether to verify the domain name
    • isPathStyle

      public boolean isPathStyle()
      Check whether path-style access to OBS is enabled. "true" indicates that path-style access is enabled while "false" (default) indicates virtual hosted-style access is enabled. Note: If the path-style access is enabled, new bucket features of OBS 3.0 are not supported.
      返回:
      Whether to enable path-style access to OBS.
    • setPathStyle

      public void setPathStyle(boolean pathStyle)
      Specify whether to enable path-style access to OBS. "true" indicates that path-style access is enabled while "false" (default) indicates that virtual hosted-style access is enabled. Note: If the path-style access is enabled, new bucket features of OBS 3.0 are not supported.
      参数:
      pathStyle - Whether to enable path-style access to OBS.
    • getConnectionTimeout

      public int getConnectionTimeout()
      Obtain the timeout interval for establishing HTTP/HTTPS connections (in milliseconds, 60,000 milliseconds by default).
      返回:
      Timeout interval for establishing HTTP/HTTPS connections
    • setConnectionTimeout

      public void setConnectionTimeout(int connectionTimeout)
      Set the timeout interval for establishing HTTP/HTTPS connections (in milliseconds, 60,000 milliseconds by default).
      参数:
      connectionTimeout - Timeout interval for establishing HTTP/HTTPS connections
    • getMaxConnections

      public int getMaxConnections()
      Obtain the maximum number of HTTP connections (1000 by default) that can be opened.
      返回:
      Maximum number of concurrently opened HTTP connections
    • setMaxConnections

      public void setMaxConnections(int maxConnections)
      Set the maximum number of HTTP connections (1000 by default) that can be opened.
      参数:
      maxConnections - Maximum number of concurrently opened HTTP connections
    • getMaxErrorRetry

      public int getMaxErrorRetry()
      Obtain the maximum number of retry attempts (5 by default) upon a request failure (request exception, or error 500 or 503 on the server).
      返回:
      Maximum number of retry attempts upon a request failure
    • setMaxErrorRetry

      public void setMaxErrorRetry(int maxErrorRetry)
      Set the maximum number of retry attempts (5 by default) upon a request failure (request exception, or error 500 or 503 on the server).
      参数:
      maxErrorRetry - Maximum number of retry attempts upon a request failure
    • getSocketTimeout

      public int getSocketTimeout()
      Obtain the timeout interval for data transmission at the socket layer (in milliseconds, 60,000 milliseconds by default).
      返回:
      Timeout interval for data transmission at the socket layer
    • setSocketTimeout

      public void setSocketTimeout(int socketTimeout)
      Set the timeout interval for data transmission at the socket layer (in milliseconds, 60,000 milliseconds by default).
      参数:
      socketTimeout - Timeout interval for data transmission at the socket layer
    • getEndPoint

      public String getEndPoint()
      Obtain the endpoint for accessing OBS.
      返回:
      OBS endpoint
    • setEndPoint

      public void setEndPoint(String endPoint)
      Set the endpoint for accessing OBS.
      参数:
      endPoint - OBS endpoint
    • getEndpointHttpPort

      public int getEndpointHttpPort()
      Obtain the port number of the HTTP request (80 by default).
      返回:
      Port number of the HTTP request
    • setEndpointHttpPort

      public void setEndpointHttpPort(int endpointHttpPort)
      Set the port number of the HTTP request (80 by default).
      参数:
      endpointHttpPort - Port number of the HTTP request
    • getEndpointHttpsPort

      public int getEndpointHttpsPort()
      Obtain the port number of the HTTPS request (443 by default).
      返回:
      Port number of the HTTPS request
    • setEndpointHttpsPort

      public void setEndpointHttpsPort(int endpointHttpsPort)
      Set the port number of the HTTPS request (443 by default).
      参数:
      endpointHttpsPort - Port number of the HTTPS request
    • setHttpsOnly

      public void setHttpsOnly(boolean httpsOnly)
      Specify whether to use HTTPS to connect OBS ("true" by default).
      参数:
      httpsOnly - Identifier specifying whether to use HTTPS to connect OBS
    • isHttpsOnly

      public boolean isHttpsOnly()
      Check whether HTTPS is used to connect OBS ("true" by default).
      返回:
      Identifier specifying whether to use HTTPS to connect OBS
    • clone

      覆盖:
      clone 在类中 Object
      抛出:
      CloneNotSupportedException
    • getHttpProxy

      public HttpProxyConfiguration getHttpProxy()
      Obtain the proxy configuration.
      返回:
      Proxy configuration
    • setHttpProxy

      public void setHttpProxy(HttpProxyConfiguration httpProxy)
      Configure the proxy.
      参数:
      httpProxy - HTTP proxy configuration
    • setHttpProxy

      @Deprecated public void setHttpProxy(String proxyAddr, int proxyPort, String userName, String password, String domain)
      已过时。
      Configure the proxy server.
      参数:
      proxyAddr - Proxy server address
      proxyPort - Proxy server port
      userName - Proxy username
      password - Proxy password
      domain - Proxy domain
    • setHttpProxy

      public void setHttpProxy(String proxyAddr, int proxyPort, String userName, String password)
      Configure the proxy server.
      参数:
      proxyAddr - Proxy server address
      proxyPort - Proxy server port
      userName - Proxy username
      password - Proxy password
    • setUploadStreamRetryBufferSize

      @Deprecated public void setUploadStreamRetryBufferSize(int uploadStreamRetryBufferSize)
      已过时。
      Set the buffer size used for uploading stream objects (in bytes). The default value is 512 KB.
      参数:
      uploadStreamRetryBufferSize - Buffer size used for uploading stream objects
    • getUploadStreamRetryBufferSize

      @Deprecated public int getUploadStreamRetryBufferSize()
      已过时。
      Obtain the buffer size used for uploading stream objects (in bytes). The default value is 512 KB.
      返回:
      Buffer size used for uploading stream objects
    • isValidateCertificate

      public boolean isValidateCertificate()
      Check whether server-side verification is enabled. The default value is "false".
      返回:
      Identifier specifying whether to enable server-side verification
    • setValidateCertificate

      public void setValidateCertificate(boolean validateCertificate)
      Specify whether to enable server-side certificate verification. The default value is "false". *
      参数:
      validateCertificate - Identifier specifying whether to enable server-side verification
    • isVerifyResponseContentType

      public boolean isVerifyResponseContentType()
      Check whether "ContentType" in the response is verified. The default value is "true".
      返回:
      Identifier specifying whether to verify "ContentType" in the response
    • setVerifyResponseContentType

      public void setVerifyResponseContentType(boolean verifyResponseContentType)
      Specify whether to verify "ContentType" in the response. The default value is "true".
      参数:
      verifyResponseContentType - Identifier specifying whether to verify "ContentType" in the response
    • getReadBufferSize

      public int getReadBufferSize()
      Obtain the read cache size used for uploading objects to socket streams (in bytes). The default value is 8192.
      返回:
      Read cache size used for uploading objects to socket streams
    • setReadBufferSize

      public void setReadBufferSize(int readBufferSize)
      Set the read cache size used for uploading objects to socket streams (in bytes). The default value is 8192.
      参数:
      readBufferSize - Read cache size used for uploading objects to socket streams
    • getWriteBufferSize

      public int getWriteBufferSize()
      Obtain the write cache size used for uploading objects to socket streams (in bytes). The default value is 8192.
      返回:
      Write cache size used for uploading objects to socket streams
    • setWriteBufferSize

      public void setWriteBufferSize(int writeBufferSize)
      Set the write cache size used for uploading objects to socket streams (in bytes). The default value is 8192.
      参数:
      writeBufferSize - Write cache size used for uploading objects to socket streams
    • getIdleConnectionTime

      public int getIdleConnectionTime()
      Obtain the idle time for obtaining connections from the connection pool. The unit is millisecond and the default value is 30000.
      返回:
      Maximum idle time for obtaining connections from the connection pool
    • setIdleConnectionTime

      public void setIdleConnectionTime(int idleConnectionTime)
      Set the idle time for obtaining connections from the connection pool. The unit is millisecond and the default value is 30000.
      参数:
      idleConnectionTime - Maximum idle time for obtaining connections from the connection pool
    • getMaxIdleConnections

      public int getMaxIdleConnections()
      Obtain the maximum number of idle connections in the connection pool. The default value is 1000.
      返回:
      Maximum number of idle connections in the connection pool
    • setMaxIdleConnections

      public void setMaxIdleConnections(int maxIdleConnections)
      Set the maximum number of idle connections in the connection pool. The default value is 1000.
      参数:
      maxIdleConnections - Maximum number of idle connections in the connection pool
    • getAuthType

      public AuthTypeEnum getAuthType()
      Obtain the authentication type.
      返回:
      Authentication type
    • setAuthType

      public void setAuthType(AuthTypeEnum authType)
      Set the authentication type.
      参数:
      authType - Authentication type
    • isKeepAlive

      public boolean isKeepAlive()
      Specify whether to use persistent connections.
      返回:
      Identifier specifying whether to use the persistent connections
    • setKeepAlive

      public void setKeepAlive(boolean keepAlive)
      Check whether persistent connections are used.
      参数:
      keepAlive - Identifier specifying whether to use the persistent connections
    • isAuthTypeNegotiation

      public boolean isAuthTypeNegotiation()
      Check whether protocol negotiation is used.
      返回:
      Identifier specifying whether to use protocol negotiation
    • setAuthTypeNegotiation

      public void setAuthTypeNegotiation(boolean authTypeNegotiation)
      Specify whether to use protocol negotiation.
      参数:
      authTypeNegotiation - Identifier specifying whether to use protocol negotiation
    • isCname

      public boolean isCname()
      Check whether user-defined domain name is used.
      返回:
      Identifier specifying whether to use user-defined domain name
    • setCname

      public void setCname(boolean cname)
      Specify whether to use user-defined domain name.
      参数:
      cname - Identifier specifying whether to use user-defined domain name
    • getSslProvider

      public String getSslProvider()
      Set the provider of SSLContext.
      返回:
      SSLContext provider
    • setSslProvider

      public void setSslProvider(String sslProvider)
      Obtain the provider of SSLContext.
      参数:
      sslProvider - SSLContext provider
    • getHttpProtocolType

      public HttpProtocolTypeEnum getHttpProtocolType()
      Set the HTTP type used for accessing OBS servers.
      返回:
      HTTP type
    • setHttpProtocolType

      public void setHttpProtocolType(HttpProtocolTypeEnum httpProtocolType)
      Obtain the HTTP type used for accessing OBS servers.
      参数:
      httpProtocolType - HTTP type
    • getHttpDispatcher

      public okhttp3.Dispatcher getHttpDispatcher()
      Set the customized dispatcher.
      返回:
      Customized dispatcher
    • setHttpDispatcher

      public void setHttpDispatcher(okhttp3.Dispatcher httpDispatcher)
      Obtain the customized dispatcher.
      参数:
      httpDispatcher - Customized dispatcher
    • getCustomizedDnsImpl

      public okhttp3.Dns getCustomizedDnsImpl()
      Obtain the customized Dns.
      返回:
      customizedDnsImpl
    • setCustomizedDnsImpl

      public void setCustomizedDnsImpl(okhttp3.Dns customizedDnsImpl)
      set the customized Dns.
      参数:
      customizedDnsImpl - Customized Dns
    • getXmlDocumentBuilderFactoryClass

      public String getXmlDocumentBuilderFactoryClass()
    • setXmlDocumentBuilderFactoryClass

      public void setXmlDocumentBuilderFactoryClass(String xmlDocumentBuilderFactoryClass)
    • getLocalAuthTypeCacheCapacity

      public int getLocalAuthTypeCacheCapacity()
    • setLocalAuthTypeCacheCapacity

      public void setLocalAuthTypeCacheCapacity(int localAuthTypeCacheCapacity)
    • getSecureRandom

      public SecureRandom getSecureRandom()
    • setSecureRandom

      public void setSecureRandom(SecureRandom secureRandom)