public class BosClientConfiguration extends BceClientConfiguration
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_STREAM_BUFFER_SIZE |
DEFAULT_CONNECTION_TIMEOUT_IN_MILLIS, DEFAULT_MAX_CONNECTIONS, DEFAULT_PROTOCOL, DEFAULT_REGION, DEFAULT_SOCKET_TIMEOUT_IN_MILLIS, DEFAULT_USER_AGENT| Constructor and Description |
|---|
BosClientConfiguration() |
BosClientConfiguration(BceClientConfiguration clientConfiguration) |
BosClientConfiguration(BceClientConfiguration clientConfiguration,
String bosEndpoint) |
| Modifier and Type | Method and Description |
|---|---|
int |
getStreamBufferSize() |
boolean |
isCnameEnabled()
Returns whether to enable using cname to visit bos resource.
|
boolean |
isEnableHttpAsyncPut()
Returns whether to enable http async put
|
void |
setCnameEnabled(boolean cnameEnabled)
Sets whether to enable using cname to visit bos resource.
|
void |
setEnableHttpAsyncPut(boolean enableHttpAsyncPut)
Set whether to enable http async put
|
void |
setStreamBufferSize(int streamBufferSize) |
BosClientConfiguration |
withCnameEnabled(boolean cnameEnabled) |
BosClientConfiguration |
withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
Sets the connection timeout in milliseconds, and returns the updated configuration instance.
|
BosClientConfiguration |
withCredentials(BceCredentials credentials)
Sets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration
instance.
|
BosClientConfiguration |
withEnableHttpAsyncPut(boolean enableHttpAsyncPut) |
BosClientConfiguration |
withEndpoint(String endpoint)
Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.
|
BosClientConfiguration |
withLocalAddress(InetAddress localAddress)
Sets the optional local address to bind when connecting to BCE services, and returns the updated configuration
instance.
|
BosClientConfiguration |
withMaxConnections(int maxConnections)
Sets the maximum number of open HTTP connections, and returns the updated configuration instance.
|
BosClientConfiguration |
withProtocol(Protocol protocol)
Sets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration
instance.
|
BosClientConfiguration |
withProxyDomain(String proxyDomain)
Sets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated
configuration instance.
|
BosClientConfiguration |
withProxyHost(String proxyHost)
Sets the optional proxy host the client will connect through, and returns the updated configuration instance.
|
BosClientConfiguration |
withProxyPassword(String proxyPassword)
Sets the optional password to use when connecting through a proxy, and returns the updated configuration
instance.
|
BosClientConfiguration |
withProxyPort(int proxyPort)
Sets the optional proxy port the client will connect through, and returns the updated configuration instance.
|
BceClientConfiguration |
withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
Sets whether to enable proxy preemptive authentication, and returns the updated configuration instance.
|
BosClientConfiguration |
withProxyUsername(String proxyUsername)
Sets the optional user name to use when connecting through a proxy, and returns the updated configuration
instance.
|
BosClientConfiguration |
withProxyWorkstation(String proxyWorkstation)
Sets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the
updated configuration instance.
|
BosClientConfiguration |
withRegion(Region region)
Sets the region of service, and returns the updated configuration instance.
|
BosClientConfiguration |
withRetryPolicy(RetryPolicy retryPolicy)
Sets the retry policy for failed requests, and returns the updated configuration instance.
|
BosClientConfiguration |
withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
Sets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration
instance.
|
BosClientConfiguration |
withSocketTimeoutInMillis(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.
|
BosClientConfiguration |
withStreamBufferSize(int streamBufferSize) |
BosClientConfiguration |
withUserAgent(String userAgent)
Sets the User-Agent header value to use when sending requests to BCE services, and returns the updated
configuration instance.
|
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, withRedirectsEnabledpublic static final int DEFAULT_STREAM_BUFFER_SIZE
public BosClientConfiguration()
public BosClientConfiguration(BceClientConfiguration clientConfiguration)
public BosClientConfiguration(BceClientConfiguration clientConfiguration, String bosEndpoint)
public int getStreamBufferSize()
public void setStreamBufferSize(int streamBufferSize)
public BosClientConfiguration withStreamBufferSize(int streamBufferSize)
public boolean isCnameEnabled()
public void setCnameEnabled(boolean cnameEnabled)
cnameEnabled - whether to enable using cname to visit bos resource.public BosClientConfiguration withCnameEnabled(boolean cnameEnabled)
public boolean isEnableHttpAsyncPut()
public void setEnableHttpAsyncPut(boolean enableHttpAsyncPut)
enableHttpAsyncPut - whether to enable http async putpublic BosClientConfiguration withEnableHttpAsyncPut(boolean enableHttpAsyncPut)
public BosClientConfiguration withProtocol(Protocol protocol)
BceClientConfigurationwithProtocol in class BceClientConfigurationprotocol - the protocol (HTTP/HTTPS) to use when connecting to BCE services.public BosClientConfiguration withMaxConnections(int maxConnections)
BceClientConfigurationwithMaxConnections in class BceClientConfigurationmaxConnections - the maximum number of open HTTP connections.public BosClientConfiguration withUserAgent(String userAgent)
BceClientConfigurationIf 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 in class BceClientConfigurationuserAgent - the User-Agent header value to use when sending requests to BCE services.public BosClientConfiguration withLocalAddress(InetAddress localAddress)
BceClientConfigurationwithLocalAddress in class BceClientConfigurationlocalAddress - the optional local address to bind when connecting to BCE services.public BosClientConfiguration withProxyHost(String proxyHost)
BceClientConfigurationThe client will connect through the proxy only if the host is not null and the port is positive.
withProxyHost in class BceClientConfigurationproxyHost - the optional proxy host the client will connect through.public BosClientConfiguration withProxyPort(int proxyPort)
BceClientConfigurationThe client will connect through the proxy only if the host is not null and the port is positive.
withProxyPort in class BceClientConfigurationproxyPort - the optional proxy port the client will connect through.public BosClientConfiguration withProxyUsername(String proxyUsername)
BceClientConfigurationwithProxyUsername in class BceClientConfigurationproxyUsername - the optional user name to use when connecting through a proxy.public BosClientConfiguration withProxyPassword(String proxyPassword)
BceClientConfigurationwithProxyPassword in class BceClientConfigurationproxyPassword - the optional password to use when connecting through a proxy.public BosClientConfiguration withProxyDomain(String proxyDomain)
BceClientConfigurationwithProxyDomain in class BceClientConfigurationproxyDomain - the optional Windows domain to use when connecting through a Windows NTLM proxy.public BosClientConfiguration withProxyWorkstation(String proxyWorkstation)
BceClientConfigurationwithProxyWorkstation in class BceClientConfigurationproxyWorkstation - the optional Windows workstation to use when connecting through a Windows NTLM proxy.public BosClientConfiguration withRetryPolicy(RetryPolicy retryPolicy)
BceClientConfigurationwithRetryPolicy in class BceClientConfigurationretryPolicy - the retry policy for failed requests.public BosClientConfiguration withSocketTimeoutInMillis(int socketTimeoutInMillis)
BceClientConfigurationwithSocketTimeoutInMillis in class BceClientConfigurationsocketTimeoutInMillis - the socket timeout (SO_TIMEOUT) in milliseconds.public BosClientConfiguration withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
BceClientConfigurationwithConnectionTimeoutInMillis in class BceClientConfigurationconnectionTimeoutInMillis - the connection timeout in milliseconds.public BosClientConfiguration withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
BceClientConfigurationwithSocketBufferSizeInBytes in class BceClientConfigurationsocketBufferSizeInBytes - the optional size (in bytes) for the low level TCP socket buffer.public BceClientConfiguration withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
BceClientConfigurationwithProxyPreemptiveAuthenticationEnabled in class BceClientConfigurationproxyPreemptiveAuthenticationEnabled - whether to enable proxy preemptive authentication.public BosClientConfiguration withEndpoint(String endpoint)
BceClientConfigurationwithEndpoint in class BceClientConfigurationendpoint - the service endpoint URL to which the client will connect.public BosClientConfiguration withRegion(Region region)
BceClientConfigurationIf the specified region is null, sets to DEFAULT_REGION.
withRegion in class BceClientConfigurationregion - the region of service.public BosClientConfiguration withCredentials(BceCredentials credentials)
BceClientConfigurationwithCredentials in class BceClientConfigurationcredentials - the BCE credentials used by the client to sign HTTP requests.Copyright © 2022. All rights reserved.