|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.BceClientConfiguration
com.baidubce.services.bos.BosClientConfiguration
public class BosClientConfiguration
Field Summary | |
---|---|
static int |
DEFAULT_STREAM_BUFFER_SIZE
|
Fields inherited from class com.baidubce.BceClientConfiguration |
---|
DEFAULT_CONNECTION_TIMEOUT_IN_MILLIS, DEFAULT_MAX_CONNECTIONS, DEFAULT_PROTOCOL, DEFAULT_REGION, DEFAULT_SOCKET_TIMEOUT_IN_MILLIS, DEFAULT_USER_AGENT |
Constructor Summary | |
---|---|
BosClientConfiguration()
|
|
BosClientConfiguration(BceClientConfiguration clientConfiguration)
|
|
BosClientConfiguration(BceClientConfiguration clientConfiguration,
String bosEndpoint)
|
Method Summary | |
---|---|
int |
getStreamBufferSize()
|
boolean |
isCnameEnabled()
Returns whether to enable using cname to visit bos resource. |
void |
setCnameEnabled(boolean cnameEnabled)
Sets whether to enable using cname to visit bos resource. |
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_STREAM_BUFFER_SIZE
Constructor Detail |
---|
public BosClientConfiguration()
public BosClientConfiguration(BceClientConfiguration clientConfiguration)
public BosClientConfiguration(BceClientConfiguration clientConfiguration, String bosEndpoint)
Method Detail |
---|
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 BosClientConfiguration withProtocol(Protocol protocol)
BceClientConfiguration
withProtocol
in class BceClientConfiguration
protocol
- the protocol (HTTP/HTTPS) to use when connecting to BCE services.
public BosClientConfiguration withMaxConnections(int maxConnections)
BceClientConfiguration
withMaxConnections
in class BceClientConfiguration
maxConnections
- the maximum number of open HTTP connections.
public BosClientConfiguration withUserAgent(String userAgent)
BceClientConfiguration
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
in class BceClientConfiguration
userAgent
- the User-Agent header value to use when sending requests to BCE services.
public BosClientConfiguration withLocalAddress(InetAddress localAddress)
BceClientConfiguration
withLocalAddress
in class BceClientConfiguration
localAddress
- the optional local address to bind when connecting to BCE services.
public BosClientConfiguration withProxyHost(String proxyHost)
BceClientConfiguration
The client will connect through the proxy only if the host is not null and the port is positive.
withProxyHost
in class BceClientConfiguration
proxyHost
- the optional proxy host the client will connect through.
public BosClientConfiguration withProxyPort(int proxyPort)
BceClientConfiguration
The client will connect through the proxy only if the host is not null and the port is positive.
withProxyPort
in class BceClientConfiguration
proxyPort
- the optional proxy port the client will connect through.
public BosClientConfiguration withProxyUsername(String proxyUsername)
BceClientConfiguration
withProxyUsername
in class BceClientConfiguration
proxyUsername
- the optional user name to use when connecting through a proxy.
public BosClientConfiguration withProxyPassword(String proxyPassword)
BceClientConfiguration
withProxyPassword
in class BceClientConfiguration
proxyPassword
- the optional password to use when connecting through a proxy.
public BosClientConfiguration withProxyDomain(String proxyDomain)
BceClientConfiguration
withProxyDomain
in class BceClientConfiguration
proxyDomain
- the optional Windows domain to use when connecting through a Windows NTLM proxy.
public BosClientConfiguration withProxyWorkstation(String proxyWorkstation)
BceClientConfiguration
withProxyWorkstation
in class BceClientConfiguration
proxyWorkstation
- the optional Windows workstation to use when connecting through a Windows NTLM proxy.
public BosClientConfiguration withRetryPolicy(RetryPolicy retryPolicy)
BceClientConfiguration
withRetryPolicy
in class BceClientConfiguration
retryPolicy
- the retry policy for failed requests.
public BosClientConfiguration withSocketTimeoutInMillis(int socketTimeoutInMillis)
BceClientConfiguration
withSocketTimeoutInMillis
in class BceClientConfiguration
socketTimeoutInMillis
- the socket timeout (SO_TIMEOUT) in milliseconds.
public BosClientConfiguration withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
BceClientConfiguration
withConnectionTimeoutInMillis
in class BceClientConfiguration
connectionTimeoutInMillis
- the connection timeout in milliseconds.
public BosClientConfiguration withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
BceClientConfiguration
withSocketBufferSizeInBytes
in class BceClientConfiguration
socketBufferSizeInBytes
- the optional size (in bytes) for the low level TCP socket buffer.
public BceClientConfiguration withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
BceClientConfiguration
withProxyPreemptiveAuthenticationEnabled
in class BceClientConfiguration
proxyPreemptiveAuthenticationEnabled
- whether to enable proxy preemptive authentication.
public BosClientConfiguration withEndpoint(String endpoint)
BceClientConfiguration
withEndpoint
in class BceClientConfiguration
endpoint
- the service endpoint URL to which the client will connect.
public BosClientConfiguration withRegion(Region region)
BceClientConfiguration
If the specified region is null, sets to DEFAULT_REGION.
withRegion
in class BceClientConfiguration
region
- the region of service.
public BosClientConfiguration withCredentials(BceCredentials credentials)
BceClientConfiguration
withCredentials
in class BceClientConfiguration
credentials
- the BCE credentials used by the client to sign HTTP requests.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |