public static interface ApacheHttpClient.Builder extends SdkHttpClient.Builder<ApacheHttpClient.Builder>
SdkHttpClient
. The factory can be configured through the builder ApacheHttpClient.builder()
, once built it can create a SdkHttpClient
via SdkHttpClient.Builder.build()
or can be passed to the SDK
client builders directly to have the SDK create and manage the HTTP client. See documentation on the service's respective
client builder for more information on configuring the HTTP layer.
SdkHttpClient httpClient = SdkHttpClient.builder() .socketTimeout(Duration.ofSeconds(10)) .build();
Modifier and Type | Method and Description |
---|---|
ApacheHttpClient.Builder |
connectionMaxIdleTime(Duration maxIdleConnectionTimeout)
Configure the maximum amount of time that a connection should be allowed to remain open while idle.
|
ApacheHttpClient.Builder |
connectionTimeout(Duration connectionTimeout)
The amount of time to wait when initially establishing a connection before giving up and timing out.
|
ApacheHttpClient.Builder |
connectionTimeToLive(Duration connectionTimeToLive)
The maximum amount of time that a connection should be allowed to remain open, regardless of usage frequency.
|
ApacheHttpClient.Builder |
expectContinueEnabled(Boolean expectContinueEnabled)
Configure whether the client should send an HTTP expect-continue handshake before each request.
|
ApacheHttpClient.Builder |
localAddress(InetAddress localAddress)
Configure the local address that the HTTP client should use for communication.
|
ApacheHttpClient.Builder |
maxConnections(Integer maxConnections)
The maximum number of connections allowed in the connection pool.
|
ApacheHttpClient.Builder |
proxyConfiguration(ProxyConfiguration proxyConfiguration)
Configuration that defines how to communicate via an HTTP proxy.
|
ApacheHttpClient.Builder |
socketTimeout(Duration socketTimeout)
The amount of time to wait for data to be transferred over an established, open connection before the connection is
timed out.
|
build, buildWithDefaults
applyMutation
ApacheHttpClient.Builder socketTimeout(Duration socketTimeout)
ApacheHttpClient.Builder connectionTimeout(Duration connectionTimeout)
ApacheHttpClient.Builder maxConnections(Integer maxConnections)
ApacheHttpClient.Builder proxyConfiguration(ProxyConfiguration proxyConfiguration)
ApacheHttpClient.Builder localAddress(InetAddress localAddress)
ApacheHttpClient.Builder expectContinueEnabled(Boolean expectContinueEnabled)
ApacheHttpClient.Builder connectionTimeToLive(Duration connectionTimeToLive)
ApacheHttpClient.Builder connectionMaxIdleTime(Duration maxIdleConnectionTimeout)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.