类 ObsConfiguration
java.lang.Object
com.obs.services.ObsConfiguration
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明clone()void已过时。void已过时。Obtain the authentication type.int已过时。intint已过时。intObtain the timeout interval for establishing HTTP/HTTPS connections (in milliseconds, 60,000 milliseconds by default).okhttp3.DnsObtain the customized Dns.已过时。Obtain the endpoint for accessing OBS.intObtain the port number of the HTTP request (80 by default).intObtain the port number of the HTTPS request (443 by default).okhttp3.EventListener.Factoryokhttp3.DispatcherSet the customized dispatcher.Set the HTTP type used for accessing OBS servers.Obtain the proxy configuration.intObtain the idle time for obtaining connections from the connection pool.Obtain the factory for generating the "KeyManager" array.intcom.obs.services.internal.utils.LocalTimeUtilintObtain the maximum number of HTTP connections (1000 by default) that can be opened.intObtain the maximum number of retry attempts (5 by default) upon a request failure (request exception, or error 500 or 503 on the server).intObtain the maximum number of idle connections in the connection pool.intObtain the read cache size used for uploading objects to socket streams (in bytes).已过时。intObtain the size (bytes) of the socket receive buffer, corresponding to the "java.net.SocketOptions.SO_RVCBUF" parameter.intObtain the timeout interval for data transmission at the socket layer (in milliseconds, 60,000 milliseconds by default).intObtain the size (bytes) of the socket send buffer, corresponding to the "java.net.SocketOptions.SO_SNDBUF" parameter.Set the provider of SSLContext.Obtain the factory for generating the "TrustManager" array.int已过时。intObtain the write cache size used for uploading objects to socket streams (in bytes).booleanCheck whether protocol negotiation is used.booleanisCname()Check whether user-defined domain name is used.booleanCheck whether path-style access to OBS is enabled.booleanCheck whether HTTPS is used to connect OBS ("true" by default).booleanSpecify whether to use persistent connections.booleanisNio()已过时。booleanCheck whether path-style access to OBS is enabled.booleanObtain the identifier specifying whether to verify the domain name ("false" by default).boolean已过时。booleanCheck whether server-side verification is enabled.booleanCheck whether "ContentType" in the response is verified.voidsetAuthType(AuthTypeEnum authType) Set the authentication type.voidsetAuthTypeNegotiation(boolean authTypeNegotiation) Specify whether to use protocol negotiation.voidsetBufferSize(int bufferSize) 已过时。voidsetCallTimeout(int callTimeout) voidsetCname(boolean cname) Specify whether to use user-defined domain name.voidsetConnectionRequestTimeout(int connectionRequestTimeout) 已过时。voidsetConnectionTimeout(int connectionTimeout) Set the timeout interval for establishing HTTP/HTTPS connections (in milliseconds, 60,000 milliseconds by default).voidsetCustomizedDnsImpl(okhttp3.Dns customizedDnsImpl) set the customized Dns.voidsetDefaultBucketLocation(String defaultBucketLocation) 已过时。voidsetDelimiter(String delimiter) Set folder isolators to slashes.voidsetDisableDnsBucket(boolean disableDns) Specify whether to enable path-style access to OBS.voidsetEndPoint(String endPoint) Set the endpoint for accessing OBS.voidsetEndpointHttpPort(int endpointHttpPort) Set the port number of the HTTP request (80 by default).voidsetEndpointHttpsPort(int endpointHttpsPort) Set the port number of the HTTPS request (443 by default).voidsetEventListenerFactory(okhttp3.EventListener.Factory eventListenerFactory) voidsetHostnameVerifier(HostnameVerifier hostnameVerifier) voidsetHttpDispatcher(okhttp3.Dispatcher httpDispatcher) Obtain the customized dispatcher.voidsetHttpProtocolType(HttpProtocolTypeEnum httpProtocolType) Obtain the HTTP type used for accessing OBS servers.voidsetHttpProxy(HttpProxyConfiguration httpProxy) Configure the proxy.voidsetHttpProxy(String proxyAddr, int proxyPort, String userName, String password) Configure the proxy server.voidsetHttpProxy(String proxyAddr, int proxyPort, String userName, String password, String domain) 已过时。voidsetHttpsOnly(boolean httpsOnly) Specify whether to use HTTPS to connect OBS ("true" by default).voidsetIdleConnectionTime(int idleConnectionTime) Set the idle time for obtaining connections from the connection pool.voidsetIsStrictHostnameVerification(boolean isStrictHostnameVerification) Set the identifier specifying whether to verify the domain name.voidsetKeepAlive(boolean keepAlive) Check whether persistent connections are used.voidsetKeyManagerFactory(KeyManagerFactory keyManagerFactory) Set the factory for generating the "KeyManager" array.voidsetLocalAuthTypeCacheCapacity(int localAuthTypeCacheCapacity) voidsetLocalTimeUtil(com.obs.services.internal.utils.LocalTimeUtil localTimeUtil) voidsetMaxConnections(int maxConnections) Set the maximum number of HTTP connections (1000 by default) that can be opened.voidsetMaxErrorRetry(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).voidsetMaxIdleConnections(int maxIdleConnections) Set the maximum number of idle connections in the connection pool.voidsetPathStyle(boolean pathStyle) Specify whether to enable path-style access to OBS.voidsetReadBufferSize(int readBufferSize) Set the read cache size used for uploading objects to socket streams (in bytes).voidsetSecureRandom(SecureRandom secureRandom) voidsetSignatString(String signatString) 已过时。voidsetSocketReadBufferSize(int socketReadBufferSize) Set the size (bytes) of the socket receive buffer, corresponding to the "java.net.SocketOptions.SO_RVCBUF" parameter.voidsetSocketTimeout(int socketTimeout) Set the timeout interval for data transmission at the socket layer (in milliseconds, 60,000 milliseconds by default).voidsetSocketWriteBufferSize(int socketWriteBufferSize) Set the size (bytes) of the socket send buffer (in bytes), corresponding to the "java.net.SocketOptions.SO_SNDBUF" parameter.voidsetSslContext(SSLContext sslContext) voidsetSslProvider(String sslProvider) Obtain the provider of SSLContext.voidsetTrustManagerFactory(TrustManagerFactory trustManagerFactory) Set the factory for generating the "TrustManager" array.voidsetUploadStreamRetryBufferSize(int uploadStreamRetryBufferSize) 已过时。voidsetUseReaper(boolean useReaper) 已过时。voidsetValidateCertificate(boolean validateCertificate) Specify whether to enable server-side certificate verification.voidsetVerifyResponseContentType(boolean verifyResponseContentType) Specify whether to verify "ContentType" in the response.voidsetWriteBufferSize(int writeBufferSize) Set the write cache size used for uploading objects to socket streams (in bytes).voidsetXmlDocumentBuilderFactoryClass(String xmlDocumentBuilderFactoryClass)
-
构造器详细资料
-
ObsConfiguration
public ObsConfiguration()Constructor
-
-
方法详细资料
-
getDelimiter
-
setDelimiter
Set folder isolators to slashes.- 参数:
delimiter- Folder isolator
-
getSignatString
已过时。 -
setSignatString
已过时。 -
getDefaultBucketLocation
已过时。 -
setDefaultBucketLocation
已过时。 -
getBufferSize
已过时。 -
setBufferSize
已过时。 -
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
已过时。 -
setConnectionRequestTimeout
已过时。 -
disableNio
已过时。 -
enableNio
已过时。 -
isNio
已过时。 -
isUseReaper
已过时。 -
setUseReaper
已过时。 -
getKeyManagerFactory
Obtain the factory for generating the "KeyManager" array.- 返回:
- Factory for generating the "KeyManager" array
-
setKeyManagerFactory
Set the factory for generating the "KeyManager" array.- 参数:
keyManagerFactory- Factory for generating the "KeyManager" array
-
getTrustManagerFactory
Obtain the factory for generating the "TrustManager" array.- 返回:
- Factory for generating the "TrustManager" array
-
setTrustManagerFactory
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
-
setEndPoint
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
Obtain the proxy configuration.- 返回:
- Proxy configuration
-
setHttpProxy
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 addressproxyPort- Proxy server portuserName- Proxy usernamepassword- Proxy passworddomain- Proxy domain
-
setHttpProxy
-
setUploadStreamRetryBufferSize
已过时。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
已过时。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
-
setAuthType
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
-
setSslProvider
Obtain the provider of SSLContext.- 参数:
sslProvider- SSLContext provider
-
getHttpProtocolType
Set the HTTP type used for accessing OBS servers.- 返回:
- HTTP type
-
setHttpProtocolType
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
-
getHostnameVerifier
-
setHostnameVerifier
-
getXmlDocumentBuilderFactoryClass
-
setXmlDocumentBuilderFactoryClass
-
getLocalAuthTypeCacheCapacity
public int getLocalAuthTypeCacheCapacity() -
setLocalAuthTypeCacheCapacity
public void setLocalAuthTypeCacheCapacity(int localAuthTypeCacheCapacity) -
getSecureRandom
-
setSecureRandom
-
getEventListenerFactory
public okhttp3.EventListener.Factory getEventListenerFactory() -
setEventListenerFactory
public void setEventListenerFactory(okhttp3.EventListener.Factory eventListenerFactory) -
getLocalTimeUtil
public com.obs.services.internal.utils.LocalTimeUtil getLocalTimeUtil() -
setLocalTimeUtil
public void setLocalTimeUtil(com.obs.services.internal.utils.LocalTimeUtil localTimeUtil) -
getSslContext
-
setSslContext
-
getCallTimeout
public int getCallTimeout() -
setCallTimeout
public void setCallTimeout(int callTimeout)
-