类 BosClientConfiguration
- java.lang.Object
-
- com.baidubce.BceClientConfiguration
-
- com.baidubce.services.bos.BosClientConfiguration
-
public class BosClientConfiguration extends BceClientConfiguration
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_STREAM_BUFFER_SIZE
-
构造器概要
构造器 构造器 说明 BosClientConfiguration()BosClientConfiguration(BceClientConfiguration clientConfiguration)BosClientConfiguration(BceClientConfiguration clientConfiguration, String bosEndpoint)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intgetStreamBufferSize()booleanisCnameEnabled()Returns whether to enable using cname to visit bos resource.booleanisEnableHttpAsyncPut()Returns whether to enable http async putbooleanisPathStyleAccessEnable()whether use path style host in BOS.voidsetCnameEnabled(boolean cnameEnabled)Sets whether to enable using cname to visit bos resource.voidsetEnableHttpAsyncPut(boolean enableHttpAsyncPut)Set whether to enable http async putvoidsetPathStyleAccessEnable(boolean pathStyleAccessEnable)Set whether use path style host in BOS.voidsetStreamBufferSize(int streamBufferSize)BosClientConfigurationwithCnameEnabled(boolean cnameEnabled)BosClientConfigurationwithConnectionTimeoutInMillis(int connectionTimeoutInMillis)Sets the connection timeout in milliseconds, and returns the updated configuration instance.BosClientConfigurationwithCredentials(BceCredentials credentials)Sets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration instance.BosClientConfigurationwithEnableHttpAsyncPut(boolean enableHttpAsyncPut)BosClientConfigurationwithEndpoint(String endpoint)Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.BosClientConfigurationwithLocalAddress(InetAddress localAddress)Sets the optional local address to bind when connecting to BCE services, and returns the updated configuration instance.BosClientConfigurationwithMaxConnections(int maxConnections)Sets the maximum number of open HTTP connections, and returns the updated configuration instance.BosClientConfigurationwithProtocol(Protocol protocol)Sets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration instance.BosClientConfigurationwithProxyDomain(String proxyDomain)Sets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.BosClientConfigurationwithProxyHost(String proxyHost)Sets the optional proxy host the client will connect through, and returns the updated configuration instance.BosClientConfigurationwithProxyPassword(String proxyPassword)Sets the optional password to use when connecting through a proxy, and returns the updated configuration instance.BosClientConfigurationwithProxyPort(int proxyPort)Sets the optional proxy port the client will connect through, and returns the updated configuration instance.BceClientConfigurationwithProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)Sets whether to enable proxy preemptive authentication, and returns the updated configuration instance.BosClientConfigurationwithProxyUsername(String proxyUsername)Sets the optional user name to use when connecting through a proxy, and returns the updated configuration instance.BosClientConfigurationwithProxyWorkstation(String proxyWorkstation)Sets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.BosClientConfigurationwithRegion(Region region)Sets the region of service, and returns the updated configuration instance.BosClientConfigurationwithRetryPolicy(RetryPolicy retryPolicy)Sets the retry policy for failed requests, and returns the updated configuration instance.BosClientConfigurationwithSocketBufferSizeInBytes(int socketBufferSizeInBytes)Sets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration instance.BosClientConfigurationwithSocketTimeoutInMillis(int socketTimeoutInMillis)Sets the socket timeout (SO_TIMEOUT) in milliseconds, which is a maximum period inactivity between two consecutive data packets, and returns the updated configuration instance.BosClientConfigurationwithStreamBufferSize(int streamBufferSize)BosClientConfigurationwithUserAgent(String userAgent)Sets the User-Agent header value to use when sending requests to BCE services, and returns the updated configuration instance.-
从类继承的方法 com.baidubce.BceClientConfiguration
getConnectionTimeoutInMillis, getCredentials, getEndpoint, getLocalAddress, getMaxConnections, getProtocol, getProxyDomain, getProxyHost, getProxyPassword, getProxyPort, getProxyUsername, getProxyWorkstation, getRegion, getRetryPolicy, getSocketBufferSizeInBytes, getSocketTimeoutInMillis, getUserAgent, isProxyPreemptiveAuthenticationEnabled, isRedirectsEnabled, setConnectionTimeoutInMillis, setCredentials, setEndpoint, setLocalAddress, setMaxConnections, setProtocol, setProxyDomain, setProxyHost, setProxyPassword, setProxyPort, setProxyPreemptiveAuthenticationEnabled, setProxyUsername, setProxyWorkstation, setRedirectsEnabled, setRegion, setRetryPolicy, setSocketBufferSizeInBytes, setSocketTimeoutInMillis, setUserAgent, toString, withRedirectsEnabled
-
-
-
-
字段详细资料
-
DEFAULT_STREAM_BUFFER_SIZE
public static final int DEFAULT_STREAM_BUFFER_SIZE
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
BosClientConfiguration
public BosClientConfiguration()
-
BosClientConfiguration
public BosClientConfiguration(BceClientConfiguration clientConfiguration)
-
BosClientConfiguration
public BosClientConfiguration(BceClientConfiguration clientConfiguration, String bosEndpoint)
-
-
方法详细资料
-
isPathStyleAccessEnable
public boolean isPathStyleAccessEnable()
whether use path style host in BOS..bcebos.com - 返回:
- the result of use path style host in BOS.
-
setPathStyleAccessEnable
public void setPathStyleAccessEnable(boolean pathStyleAccessEnable)
Set whether use path style host in BOS..bcebos.com - 参数:
pathStyleAccessEnable- whether use path style host in BOS.
-
getStreamBufferSize
public int getStreamBufferSize()
-
setStreamBufferSize
public void setStreamBufferSize(int streamBufferSize)
-
withStreamBufferSize
public BosClientConfiguration withStreamBufferSize(int streamBufferSize)
-
isCnameEnabled
public boolean isCnameEnabled()
Returns whether to enable using cname to visit bos resource.- 返回:
- whether to enable using cname to visit bos resource.
-
setCnameEnabled
public void setCnameEnabled(boolean cnameEnabled)
Sets whether to enable using cname to visit bos resource.- 参数:
cnameEnabled- whether to enable using cname to visit bos resource.
-
withCnameEnabled
public BosClientConfiguration withCnameEnabled(boolean cnameEnabled)
-
isEnableHttpAsyncPut
public boolean isEnableHttpAsyncPut()
Returns whether to enable http async put- 返回:
- whether to enable http async put
-
setEnableHttpAsyncPut
public void setEnableHttpAsyncPut(boolean enableHttpAsyncPut)
Set whether to enable http async put- 参数:
enableHttpAsyncPut- whether to enable http async put
-
withEnableHttpAsyncPut
public BosClientConfiguration withEnableHttpAsyncPut(boolean enableHttpAsyncPut)
-
withProtocol
public BosClientConfiguration withProtocol(Protocol protocol)
从类复制的说明:BceClientConfigurationSets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration instance.- 覆盖:
withProtocol在类中BceClientConfiguration- 参数:
protocol- the protocol (HTTP/HTTPS) to use when connecting to BCE services.- 返回:
- the updated configuration instance.
-
withMaxConnections
public BosClientConfiguration withMaxConnections(int maxConnections)
从类复制的说明:BceClientConfigurationSets the maximum number of open HTTP connections, and returns the updated configuration instance.- 覆盖:
withMaxConnections在类中BceClientConfiguration- 参数:
maxConnections- the maximum number of open HTTP connections.- 返回:
- the updated configuration instance.
-
withUserAgent
public BosClientConfiguration withUserAgent(String userAgent)
从类复制的说明:BceClientConfigurationSets the User-Agent header value to use when sending requests to BCE services, and returns the updated configuration instance.If the specified value is null, DEFAULT_USER_AGENT is used. If the specified value does not end with DEFAULT_USER_AGENT, DEFAULT_USER_AGENT is appended.
- 覆盖:
withUserAgent在类中BceClientConfiguration- 参数:
userAgent- the User-Agent header value to use when sending requests to BCE services.- 返回:
- the updated configuration instance.
-
withLocalAddress
public BosClientConfiguration withLocalAddress(InetAddress localAddress)
从类复制的说明:BceClientConfigurationSets the optional local address to bind when connecting to BCE services, and returns the updated configuration instance.- 覆盖:
withLocalAddress在类中BceClientConfiguration- 参数:
localAddress- the optional local address to bind when connecting to BCE services.- 返回:
- the updated configuration instance.
-
withProxyHost
public BosClientConfiguration withProxyHost(String proxyHost)
从类复制的说明:BceClientConfigurationSets the optional proxy host the client will connect through, and returns the updated configuration instance.The client will connect through the proxy only if the host is not null and the port is positive.
- 覆盖:
withProxyHost在类中BceClientConfiguration- 参数:
proxyHost- the optional proxy host the client will connect through.- 返回:
- the updated configuration instance.
-
withProxyPort
public BosClientConfiguration withProxyPort(int proxyPort)
从类复制的说明:BceClientConfigurationSets the optional proxy port the client will connect through, and returns the updated configuration instance.The client will connect through the proxy only if the host is not null and the port is positive.
- 覆盖:
withProxyPort在类中BceClientConfiguration- 参数:
proxyPort- the optional proxy port the client will connect through.- 返回:
- the updated configuration instance.
-
withProxyUsername
public BosClientConfiguration withProxyUsername(String proxyUsername)
从类复制的说明:BceClientConfigurationSets the optional user name to use when connecting through a proxy, and returns the updated configuration instance.- 覆盖:
withProxyUsername在类中BceClientConfiguration- 参数:
proxyUsername- the optional user name to use when connecting through a proxy.- 返回:
- the updated configuration instance.
-
withProxyPassword
public BosClientConfiguration withProxyPassword(String proxyPassword)
从类复制的说明:BceClientConfigurationSets the optional password to use when connecting through a proxy, and returns the updated configuration instance.- 覆盖:
withProxyPassword在类中BceClientConfiguration- 参数:
proxyPassword- the optional password to use when connecting through a proxy.- 返回:
- the updated configuration instance.
-
withProxyDomain
public BosClientConfiguration withProxyDomain(String proxyDomain)
从类复制的说明:BceClientConfigurationSets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.- 覆盖:
withProxyDomain在类中BceClientConfiguration- 参数:
proxyDomain- the optional Windows domain to use when connecting through a Windows NTLM proxy.- 返回:
- the updated configuration instance.
-
withProxyWorkstation
public BosClientConfiguration withProxyWorkstation(String proxyWorkstation)
从类复制的说明:BceClientConfigurationSets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.- 覆盖:
withProxyWorkstation在类中BceClientConfiguration- 参数:
proxyWorkstation- the optional Windows workstation to use when connecting through a Windows NTLM proxy.- 返回:
- the updated configuration instance.
-
withRetryPolicy
public BosClientConfiguration withRetryPolicy(RetryPolicy retryPolicy)
从类复制的说明:BceClientConfigurationSets the retry policy for failed requests, and returns the updated configuration instance.- 覆盖:
withRetryPolicy在类中BceClientConfiguration- 参数:
retryPolicy- the retry policy for failed requests.- 返回:
- the updated configuration instance.
-
withSocketTimeoutInMillis
public BosClientConfiguration withSocketTimeoutInMillis(int socketTimeoutInMillis)
从类复制的说明:BceClientConfigurationSets the socket timeout (SO_TIMEOUT) in milliseconds, which is a maximum period inactivity between two consecutive data packets, and returns the updated configuration instance. A value of 0 means infinity, and is not recommended.- 覆盖:
withSocketTimeoutInMillis在类中BceClientConfiguration- 参数:
socketTimeoutInMillis- the socket timeout (SO_TIMEOUT) in milliseconds.- 返回:
- the updated configuration instance.
-
withConnectionTimeoutInMillis
public BosClientConfiguration withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
从类复制的说明:BceClientConfigurationSets the connection timeout in milliseconds, and returns the updated configuration instance. A value of 0 means infinity, and is not recommended.- 覆盖:
withConnectionTimeoutInMillis在类中BceClientConfiguration- 参数:
connectionTimeoutInMillis- the connection timeout in milliseconds.- 返回:
- the updated configuration instance.
-
withSocketBufferSizeInBytes
public BosClientConfiguration withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
从类复制的说明:BceClientConfigurationSets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration instance. This is an advanced option for advanced users who want to tune low level TCP parameters to try and squeeze out more performance. Ignored if not positive.- 覆盖:
withSocketBufferSizeInBytes在类中BceClientConfiguration- 参数:
socketBufferSizeInBytes- the optional size (in bytes) for the low level TCP socket buffer.- 返回:
- the updated configuration instance.
-
withProxyPreemptiveAuthenticationEnabled
public BceClientConfiguration withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
从类复制的说明:BceClientConfigurationSets whether to enable proxy preemptive authentication, and returns the updated configuration instance. If it is true, the client will send the basic authentication response even before the proxy server gives an unauthorized response in certain situations, thus reducing the overhead of making the connection.- 覆盖:
withProxyPreemptiveAuthenticationEnabled在类中BceClientConfiguration- 参数:
proxyPreemptiveAuthenticationEnabled- whether to enable proxy preemptive authentication.- 返回:
- the updated configuration instance.
-
withEndpoint
public BosClientConfiguration withEndpoint(String endpoint)
从类复制的说明:BceClientConfigurationSets the service endpoint URL to which the client will connect, and returns the updated configuration instance.- 覆盖:
withEndpoint在类中BceClientConfiguration- 参数:
endpoint- the service endpoint URL to which the client will connect.- 返回:
- the updated configuration instance.
-
withRegion
public BosClientConfiguration withRegion(Region region)
从类复制的说明:BceClientConfigurationSets the region of service, and returns the updated configuration instance. This value is used by the client to construct the endpoint URL automatically, and is ignored if endpoint is not null.If the specified region is null, sets to DEFAULT_REGION.
- 覆盖:
withRegion在类中BceClientConfiguration- 参数:
region- the region of service.- 返回:
- the updated configuration instance.
-
withCredentials
public BosClientConfiguration withCredentials(BceCredentials credentials)
从类复制的说明:BceClientConfigurationSets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration instance.- 覆盖:
withCredentials在类中BceClientConfiguration- 参数:
credentials- the BCE credentials used by the client to sign HTTP requests.- 返回:
- the updated configuration instance.
-
-