com.baidubce.services.sms
Class SmsClientConfiguration

java.lang.Object
  extended by com.baidubce.BceClientConfiguration
      extended by com.baidubce.services.sms.SmsClientConfiguration

public class SmsClientConfiguration
extends BceClientConfiguration

All client configurations for SMS clients.

Default configurations inherit super class BceClientConfiguration.


Field Summary
 
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
SmsClientConfiguration()
           
 
Method Summary
 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.
 
Methods inherited from class com.baidubce.BceClientConfiguration
getConnectionTimeoutInMillis, getCredentials, getEndpoint, getLocalAddress, getMaxConnections, getProtocol, getProxyDomain, getProxyHost, getProxyPassword, getProxyPort, getProxyUsername, getProxyWorkstation, getRegion, getRetryPolicy, getSocketBufferSizeInBytes, getSocketTimeoutInMillis, getUserAgent, isProxyPreemptiveAuthenticationEnabled, setConnectionTimeoutInMillis, setCredentials, setEndpoint, setLocalAddress, setMaxConnections, setProtocol, setProxyDomain, setProxyHost, setProxyPassword, setProxyPort, setProxyPreemptiveAuthenticationEnabled, setProxyUsername, setProxyWorkstation, setRegion, setRetryPolicy, setSocketBufferSizeInBytes, setSocketTimeoutInMillis, setUserAgent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmsClientConfiguration

public SmsClientConfiguration()
Method Detail

withCredentials

public SmsClientConfiguration withCredentials(BceCredentials credentials)
Description copied from class: BceClientConfiguration
Sets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration instance.

Overrides:
withCredentials in class BceClientConfiguration
Parameters:
credentials - the BCE credentials used by the client to sign HTTP requests.
Returns:
the updated configuration instance.

withEndpoint

public SmsClientConfiguration withEndpoint(String endpoint)
Description copied from class: BceClientConfiguration
Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.

Overrides:
withEndpoint in class BceClientConfiguration
Parameters:
endpoint - the service endpoint URL to which the client will connect.
Returns:
the updated configuration instance.

withProtocol

public SmsClientConfiguration withProtocol(Protocol protocol)
Description copied from class: BceClientConfiguration
Sets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration instance.

Overrides:
withProtocol in class BceClientConfiguration
Parameters:
protocol - the protocol (HTTP/HTTPS) to use when connecting to BCE services.
Returns:
the updated configuration instance.

withMaxConnections

public SmsClientConfiguration withMaxConnections(int maxConnections)
Description copied from class: BceClientConfiguration
Sets the maximum number of open HTTP connections, and returns the updated configuration instance.

Overrides:
withMaxConnections in class BceClientConfiguration
Parameters:
maxConnections - the maximum number of open HTTP connections.
Returns:
the updated configuration instance.

withUserAgent

public SmsClientConfiguration withUserAgent(String userAgent)
Description copied from class: BceClientConfiguration
Sets 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.

Overrides:
withUserAgent in class BceClientConfiguration
Parameters:
userAgent - the User-Agent header value to use when sending requests to BCE services.
Returns:
the updated configuration instance.

withLocalAddress

public SmsClientConfiguration withLocalAddress(InetAddress localAddress)
Description copied from class: BceClientConfiguration
Sets the optional local address to bind when connecting to BCE services, and returns the updated configuration instance.

Overrides:
withLocalAddress in class BceClientConfiguration
Parameters:
localAddress - the optional local address to bind when connecting to BCE services.
Returns:
the updated configuration instance.

withProxyHost

public SmsClientConfiguration withProxyHost(String proxyHost)
Description copied from class: BceClientConfiguration
Sets 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.

Overrides:
withProxyHost in class BceClientConfiguration
Parameters:
proxyHost - the optional proxy host the client will connect through.
Returns:
the updated configuration instance.

withProxyPort

public SmsClientConfiguration withProxyPort(int proxyPort)
Description copied from class: BceClientConfiguration
Sets 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.

Overrides:
withProxyPort in class BceClientConfiguration
Parameters:
proxyPort - the optional proxy port the client will connect through.
Returns:
the updated configuration instance.

withProxyUsername

public SmsClientConfiguration withProxyUsername(String proxyUsername)
Description copied from class: BceClientConfiguration
Sets the optional user name to use when connecting through a proxy, and returns the updated configuration instance.

Overrides:
withProxyUsername in class BceClientConfiguration
Parameters:
proxyUsername - the optional user name to use when connecting through a proxy.
Returns:
the updated configuration instance.

withProxyPassword

public SmsClientConfiguration withProxyPassword(String proxyPassword)
Description copied from class: BceClientConfiguration
Sets the optional password to use when connecting through a proxy, and returns the updated configuration instance.

Overrides:
withProxyPassword in class BceClientConfiguration
Parameters:
proxyPassword - the optional password to use when connecting through a proxy.
Returns:
the updated configuration instance.

withProxyDomain

public SmsClientConfiguration withProxyDomain(String proxyDomain)
Description copied from class: BceClientConfiguration
Sets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.

Overrides:
withProxyDomain in class BceClientConfiguration
Parameters:
proxyDomain - the optional Windows domain to use when connecting through a Windows NTLM proxy.
Returns:
the updated configuration instance.

withProxyWorkstation

public SmsClientConfiguration withProxyWorkstation(String proxyWorkstation)
Description copied from class: BceClientConfiguration
Sets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.

Overrides:
withProxyWorkstation in class BceClientConfiguration
Parameters:
proxyWorkstation - the optional Windows workstation to use when connecting through a Windows NTLM proxy.
Returns:
the updated configuration instance.

withProxyPreemptiveAuthenticationEnabled

public SmsClientConfiguration withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)
Description copied from class: BceClientConfiguration
Sets 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.

Overrides:
withProxyPreemptiveAuthenticationEnabled in class BceClientConfiguration
Parameters:
proxyPreemptiveAuthenticationEnabled - whether to enable proxy preemptive authentication.
Returns:
the updated configuration instance.

withRetryPolicy

public SmsClientConfiguration withRetryPolicy(RetryPolicy retryPolicy)
Description copied from class: BceClientConfiguration
Sets the retry policy for failed requests, and returns the updated configuration instance.

Overrides:
withRetryPolicy in class BceClientConfiguration
Parameters:
retryPolicy - the retry policy for failed requests.
Returns:
the updated configuration instance.

withSocketTimeoutInMillis

public SmsClientConfiguration withSocketTimeoutInMillis(int socketTimeoutInMillis)
Description copied from class: BceClientConfiguration
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. A value of 0 means infinity, and is not recommended.

Overrides:
withSocketTimeoutInMillis in class BceClientConfiguration
Parameters:
socketTimeoutInMillis - the socket timeout (SO_TIMEOUT) in milliseconds.
Returns:
the updated configuration instance.

withConnectionTimeoutInMillis

public SmsClientConfiguration withConnectionTimeoutInMillis(int connectionTimeoutInMillis)
Description copied from class: BceClientConfiguration
Sets the connection timeout in milliseconds, and returns the updated configuration instance. A value of 0 means infinity, and is not recommended.

Overrides:
withConnectionTimeoutInMillis in class BceClientConfiguration
Parameters:
connectionTimeoutInMillis - the connection timeout in milliseconds.
Returns:
the updated configuration instance.

withSocketBufferSizeInBytes

public SmsClientConfiguration withSocketBufferSizeInBytes(int socketBufferSizeInBytes)
Description copied from class: BceClientConfiguration
Sets 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.

Overrides:
withSocketBufferSizeInBytes in class BceClientConfiguration
Parameters:
socketBufferSizeInBytes - the optional size (in bytes) for the low level TCP socket buffer.
Returns:
the updated configuration instance.

withRegion

public SmsClientConfiguration withRegion(Region region)
Description copied from class: BceClientConfiguration
Sets 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.

Overrides:
withRegion in class BceClientConfiguration
Parameters:
region - the region of service.
Returns:
the updated configuration instance.


Copyright © 2018. All rights reserved.