类 SmsClientConfiguration
- java.lang.Object
-
- com.baidubce.BceClientConfiguration
-
- com.baidubce.services.sms.SmsClientConfiguration
-
public class SmsClientConfiguration extends BceClientConfiguration
All client configurations for SMS clients.Default configurations inherit super class
BceClientConfiguration.
-
-
构造器概要
构造器 构造器 说明 SmsClientConfiguration()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 SmsClientConfigurationwithConnectionTimeoutInMillis(int connectionTimeoutInMillis)Sets the connection timeout in milliseconds, and returns the updated configuration instance.SmsClientConfigurationwithCredentials(BceCredentials credentials)Sets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration instance.SmsClientConfigurationwithEndpoint(String endpoint)Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.SmsClientConfigurationwithLocalAddress(InetAddress localAddress)Sets the optional local address to bind when connecting to BCE services, and returns the updated configuration instance.SmsClientConfigurationwithMaxConnections(int maxConnections)Sets the maximum number of open HTTP connections, and returns the updated configuration instance.SmsClientConfigurationwithProtocol(Protocol protocol)Sets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration instance.SmsClientConfigurationwithProxyDomain(String proxyDomain)Sets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.SmsClientConfigurationwithProxyHost(String proxyHost)Sets the optional proxy host the client will connect through, and returns the updated configuration instance.SmsClientConfigurationwithProxyPassword(String proxyPassword)Sets the optional password to use when connecting through a proxy, and returns the updated configuration instance.SmsClientConfigurationwithProxyPort(int proxyPort)Sets the optional proxy port the client will connect through, and returns the updated configuration instance.SmsClientConfigurationwithProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)Sets whether to enable proxy preemptive authentication, and returns the updated configuration instance.SmsClientConfigurationwithProxyUsername(String proxyUsername)Sets the optional user name to use when connecting through a proxy, and returns the updated configuration instance.SmsClientConfigurationwithProxyWorkstation(String proxyWorkstation)Sets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.SmsClientConfigurationwithRegion(Region region)Sets the region of service, and returns the updated configuration instance.SmsClientConfigurationwithRetryPolicy(RetryPolicy retryPolicy)Sets the retry policy for failed requests, and returns the updated configuration instance.SmsClientConfigurationwithSocketBufferSizeInBytes(int socketBufferSizeInBytes)Sets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration instance.SmsClientConfigurationwithSocketTimeoutInMillis(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.SmsClientConfigurationwithUserAgent(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
-
-
-
-
方法详细资料
-
withCredentials
public SmsClientConfiguration 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.
-
withEndpoint
public SmsClientConfiguration 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.
-
withProtocol
public SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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.
-
withProxyPreemptiveAuthenticationEnabled
public SmsClientConfiguration 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.
-
withRetryPolicy
public SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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 SmsClientConfiguration 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.
-
withRegion
public SmsClientConfiguration 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.
-
-