## com.baidubce.services.ses
Class SesClientConfiguration

    java.lang.Object
      com.baidubce.BceClientConfiguration
          com.baidubce.services.ses.SesClientConfiguration

    public class SesClientConfiguration

extends BceClientConfiguration

All client configurations for SES 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
`SesClientConfiguration()`

Method Summary
`SesClientConfiguration` `withConnectionTimeoutInMillis(int connectionTimeoutInMillis)` Sets the connection timeout in milliseconds, and returns the updated configuration instance.
`SesClientConfiguration` `withCredentials(BceCredentials credentials)` Sets the BCE credentials used by the client to sign HTTP requests, and returns the updated configuration instance.
`SesClientConfiguration` `withEndpoint(String endpoint)` Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.
`SesClientConfiguration` `withLocalAddress(InetAddress localAddress)` Sets the optional local address to bind when connecting to BCE services, and returns the updated configuration instance.
`SesClientConfiguration` `withMaxConnections(int maxConnections)` Sets the maximum number of open HTTP connections, and returns the updated configuration instance.
`SesClientConfiguration` `withProtocol(Protocol protocol)` Sets the protocol (HTTP/HTTPS) to use when connecting to BCE services, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyDomain(String proxyDomain)` Sets the optional Windows domain to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyHost(String proxyHost)` Sets the optional proxy host the client will connect through, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyPassword(String proxyPassword)` Sets the optional password to use when connecting through a proxy, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyPort(int proxyPort)` Sets the optional proxy port the client will connect through, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyPreemptiveAuthenticationEnabled(boolean proxyPreemptiveAuthenticationEnabled)` Sets whether to enable proxy preemptive authentication, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyUsername(String proxyUsername)` Sets the optional user name to use when connecting through a proxy, and returns the updated configuration instance.
`SesClientConfiguration` `withProxyWorkstation(String proxyWorkstation)` Sets the optional Windows workstation to use when connecting through a Windows NTLM proxy, and returns the updated configuration instance.
`SesClientConfiguration` `withRegion(Region region)` Sets the region of service, and returns the updated configuration instance.
`SesClientConfiguration` `withRetryPolicy(RetryPolicy retryPolicy)` Sets the retry policy for failed requests, and returns the updated configuration instance.
`SesClientConfiguration` `withSocketBufferSizeInBytes(int socketBufferSizeInBytes)` Sets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration instance.
`SesClientConfiguration` `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.
`SesClientConfiguration` `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

### SesClientConfiguration

    public SesClientConfiguration()

Method Detail

### withCredentials

    public SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 SesClientConfiguration 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 © 2016. All rights reserved.