public class SmsClientConfiguration extends BceClientConfiguration
Default configurations inherit super class BceClientConfiguration.
DEFAULT_CONNECTION_TIMEOUT_IN_MILLIS, DEFAULT_MAX_CONNECTIONS, DEFAULT_PROTOCOL, DEFAULT_REGION, DEFAULT_SOCKET_TIMEOUT_IN_MILLIS, DEFAULT_USER_AGENT| Constructor and Description |
|---|
SmsClientConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
SmsClientConfiguration |
withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
Sets the connection timeout in milliseconds, and returns the updated configuration instance.
|
SmsClientConfiguration |
withCredentials(BceCredentials credentials)
Sets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration
instance.
|
SmsClientConfiguration |
withEndpoint(String endpoint)
Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.
|
SmsClientConfiguration |
withLocalAddress(InetAddress localAddress)
Sets the optional local address to bind when connecting to BCE services, and returns the updated configuration
instance.
|
SmsClientConfiguration |
withMaxConnections(int maxConnections)
Sets the maximum number of open HTTP connections, and returns the updated configuration instance.
|
SmsClientConfiguration |
withProtocol(Protocol protocol)
Sets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration
instance.
|
SmsClientConfiguration |
withProxyDomain(String proxyDomain)
Sets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated
configuration instance.
|
SmsClientConfiguration |
withProxyHost(String proxyHost)
Sets the optional proxy host the client will connect through, and returns the updated configuration instance.
|
SmsClientConfiguration |
withProxyPassword(String proxyPassword)
Sets the optional password to use when connecting through a proxy, and returns the updated configuration
instance.
|
SmsClientConfiguration |
withProxyPort(int proxyPort)
Sets the optional proxy port the client will connect through, and returns the updated configuration instance.
|
SmsClientConfiguration |
withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
Sets whether to enable proxy preemptive authentication, and returns the updated configuration instance.
|
SmsClientConfiguration |
withProxyUsername(String proxyUsername)
Sets the optional user name to use when connecting through a proxy, and returns the updated configuration
instance.
|
SmsClientConfiguration |
withProxyWorkstation(String proxyWorkstation)
Sets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the
updated configuration instance.
|
SmsClientConfiguration |
withRegion(Region region)
Sets the region of service, and returns the updated configuration instance.
|
SmsClientConfiguration |
withRetryPolicy(RetryPolicy retryPolicy)
Sets the retry policy for failed requests, and returns the updated configuration instance.
|
SmsClientConfiguration |
withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
Sets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration
instance.
|
SmsClientConfiguration |
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.
|
SmsClientConfiguration |
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, getIoThreadCount, getLocalAddress, getMaxConnections, getProtocol, getProxyDomain, getProxyHost, getProxyPassword, getProxyPort, getProxyUsername, getProxyWorkstation, getRegion, getRetryPolicy, getSocketBufferSizeInBytes, getSocketTimeoutInMillis, getUserAgent, isProxyPreemptiveAuthenticationEnabled, isRedirectsEnabled, setConnectionTimeoutInMillis, setCredentials, setEndpoint, setIoThreadCount, setLocalAddress, setMaxConnections, setProtocol, setProxyDomain, setProxyHost, setProxyPassword, setProxyPort, setProxyPreemptiveAuthenticationEnabled, setProxyUsername, setProxyWorkstation, setRedirectsEnabled, setRegion, setRetryPolicy, setSocketBufferSizeInBytes, setSocketTimeoutInMillis, setUserAgent, toString, withIoThreadCount, withRedirectsEnabledpublic SmsClientConfiguration withCredentials(BceCredentials credentials)
BceClientConfigurationwithCredentials in class BceClientConfigurationcredentials - the BCE credentials used by the client to sign HTTP requests.public SmsClientConfiguration withEndpoint(String endpoint)
BceClientConfigurationwithEndpoint in class BceClientConfigurationendpoint - the service endpoint URL to which the client will connect.public SmsClientConfiguration withProtocol(Protocol protocol)
BceClientConfigurationwithProtocol in class BceClientConfigurationprotocol - the protocol (HTTP/HTTPS) to use when connecting to BCE services.public SmsClientConfiguration withMaxConnections(int maxConnections)
BceClientConfigurationwithMaxConnections in class BceClientConfigurationmaxConnections - the maximum number of open HTTP connections.public SmsClientConfiguration 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 SmsClientConfiguration withLocalAddress(InetAddress localAddress)
BceClientConfigurationwithLocalAddress in class BceClientConfigurationlocalAddress - the optional local address to bind when connecting to BCE services.public SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration withProxyUsername(String proxyUsername)
BceClientConfigurationwithProxyUsername in class BceClientConfigurationproxyUsername - the optional user name to use when connecting through a proxy.public SmsClientConfiguration withProxyPassword(String proxyPassword)
BceClientConfigurationwithProxyPassword in class BceClientConfigurationproxyPassword - the optional password to use when connecting through a proxy.public SmsClientConfiguration withProxyDomain(String proxyDomain)
BceClientConfigurationwithProxyDomain in class BceClientConfigurationproxyDomain - the optional Windows domain to use when connecting through a Windows NTLM proxy.public SmsClientConfiguration withProxyWorkstation(String proxyWorkstation)
BceClientConfigurationwithProxyWorkstation in class BceClientConfigurationproxyWorkstation - the optional Windows workstation to use when connecting through a Windows NTLM proxy.public SmsClientConfiguration withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
BceClientConfigurationwithProxyPreemptiveAuthenticationEnabled in class BceClientConfigurationproxyPreemptiveAuthenticationEnabled - whether to enable proxy preemptive authentication.public SmsClientConfiguration withRetryPolicy(RetryPolicy retryPolicy)
BceClientConfigurationwithRetryPolicy in class BceClientConfigurationretryPolicy - the retry policy for failed requests.public SmsClientConfiguration withSocketTimeoutInMillis(int socketTimeoutInMillis)
BceClientConfigurationwithSocketTimeoutInMillis in class BceClientConfigurationsocketTimeoutInMillis - the socket timeout (SO_TIMEOUT) in milliseconds.public SmsClientConfiguration withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
BceClientConfigurationwithConnectionTimeoutInMillis in class BceClientConfigurationconnectionTimeoutInMillis - the connection timeout in milliseconds.public SmsClientConfiguration withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
BceClientConfigurationwithSocketBufferSizeInBytes in class BceClientConfigurationsocketBufferSizeInBytes - the optional size (in bytes) for the low level TCP socket buffer.public SmsClientConfiguration withRegion(Region region)
BceClientConfigurationIf the specified region is null, sets to DEFAULT_REGION.
withRegion in class BceClientConfigurationregion - the region of service.Copyright © 2024. All rights reserved.