User guide
If you're connecting to the Internet through a proxy server, you'll need to configure your proxy server
settings (proxy host, port and username/password) through the ClientConfiguration object.
HTTP Transport Configuration
You can configure several HTTP transport options by using the ClientConfiguration object. New
options are occasionally added; to see the full list of options that can be retrieved or set, see the SDK for
Java reference.
Each of the configurable values has a default value defined by a constant. For a list of the constant values
for ClientConfiguration, see Constant Field Values in the SDK for Java Reference.
Topics
• Local Address (p. 15)
• Maximum Connections (p. 15)
• Proxy Options (p. 15)
• Timeouts and Error Handling (p. 15)
Local Address
To set the local address that the HTTP client will bind to, use ClientConfiguration.setLocalAddress.
Maximum Connections
You can set the maximum allowed number of open HTTP connections by using the
ClientConfiguration.setMaxConnections method.
Proxy Options
If you use a proxy with your HTTP connections, you may need to set certain options related to HTTP
proxies:
Timeouts and Error Handling
You can set options related to timeouts and handling errors with HTTP connections:
• Connection Timeout
The connection timeout is the amount of time (in milliseconds) that the HTTP connection will wait to
establish a connection before giving up.The default is 50,000ms.
To set this value yourself, use the ClientConfiguration.setConnectionTimeout method.
• Connection Time to Live (TTL)
By default, the SDK will attempt to reuse HTTP connections as long as possible. In failure situations
where a connection is established to a server that has been brought out of service, having a finite TTL
can help with application recovery. For example, setting a 15 minute TTL will ensure that even if you
have a connection established to a server that is experiencing issues, you’ll reestablish a connection
to a new server within 15 minutes.
To set the HTTP connection TTL, use the ClientConfiguration.setConnectionTTL method.
• Maximum Error Retries
You can set the maximum retry count for retriable errors by using the
ClientConfiguration.setMaxErrorRetry method.
Version v1.0.0
15
AWS SDK for Java Developer Guide
HTTP Transport Configuration