Interface AwsCrtAsyncHttpClient.Builder
- All Superinterfaces:
Buildable
,SdkAsyncHttpClient.Builder<AwsCrtAsyncHttpClient.Builder>
,SdkBuilder<AwsCrtAsyncHttpClient.Builder,
SdkAsyncHttpClient>
- Enclosing class:
AwsCrtAsyncHttpClient
-
Method Summary
Modifier and TypeMethodDescriptionconnectionHealthConfiguration
(Consumer<ConnectionHealthConfiguration.Builder> healthChecksConfigurationBuilder) A convenience method that creates an instance of theConnectionHealthConfiguration
builder, avoiding the need to create one manually viaConnectionHealthConfiguration.builder()
.connectionHealthConfiguration
(ConnectionHealthConfiguration healthChecksConfiguration) Configure the health checks for all connections established by this client.connectionMaxIdleTime
(Duration connectionMaxIdleTime) Configure the maximum amount of time that a connection should be allowed to remain open while idle.connectionTimeout
(Duration connectionTimeout) The amount of time to wait when initially establishing a connection before giving up and timing out.maxConcurrency
(Integer maxConcurrency) The Maximum number of allowed concurrent requests.postQuantumTlsEnabled
(Boolean postQuantumTlsEnabled) Configure whether to enable a hybrid post-quantum key exchange option for the Transport Layer Security (TLS) network encryption protocol when communicating with services that support Post Quantum TLS.proxyConfiguration
(Consumer<ProxyConfiguration.Builder> proxyConfigurationBuilderConsumer) Sets the http proxy configuration to use for this client.proxyConfiguration
(ProxyConfiguration proxyConfiguration) Sets the http proxy configuration to use for this client.readBufferSizeInBytes
(Long readBufferSize) Configures the number of unread bytes that can be buffered in the client before we stop reading from the underlying TCP socket and wait for the Subscriber to read more data.tcpKeepAliveConfiguration
(Consumer<TcpKeepAliveConfiguration.Builder> tcpKeepAliveConfigurationBuilder) Configure whether to enabletcpKeepAlive
and relevant configuration for all connections established by this client.tcpKeepAliveConfiguration
(TcpKeepAliveConfiguration tcpKeepAliveConfiguration) Configure whether to enabletcpKeepAlive
and relevant configuration for all connections established by this client.Methods inherited from interface software.amazon.awssdk.http.async.SdkAsyncHttpClient.Builder
build, buildWithDefaults
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
maxConcurrency
The Maximum number of allowed concurrent requests. For HTTP/1.1 this is the same as max connections.- Parameters:
maxConcurrency
- maximum concurrency per endpoint- Returns:
- The builder of the method chaining.
-
readBufferSizeInBytes
Configures the number of unread bytes that can be buffered in the client before we stop reading from the underlying TCP socket and wait for the Subscriber to read more data.- Parameters:
readBufferSize
- The number of bytes that can be buffered.- Returns:
- The builder of the method chaining.
-
proxyConfiguration
Sets the http proxy configuration to use for this client.- Parameters:
proxyConfiguration
- The http proxy configuration to use- Returns:
- The builder of the method chaining.
-
proxyConfiguration
AwsCrtAsyncHttpClient.Builder proxyConfiguration(Consumer<ProxyConfiguration.Builder> proxyConfigurationBuilderConsumer) Sets the http proxy configuration to use for this client.- Parameters:
proxyConfigurationBuilderConsumer
- The consumer of the proxy configuration builder object.- Returns:
- the builder for method chaining.
-
connectionHealthConfiguration
AwsCrtAsyncHttpClient.Builder connectionHealthConfiguration(ConnectionHealthConfiguration healthChecksConfiguration) Configure the health checks for all connections established by this client.You can set a throughput threshold for a connection to be considered healthy. If a connection falls below this threshold (
CrtConnectionHealthConfiguration.minimumThroughputInBps()
) for the configurable amount of time (CrtConnectionHealthConfiguration.minimumThroughputTimeout()
), then the connection is considered unhealthy and will be shut down.By default, monitoring options are disabled. You can enable
healthChecks
by providing this configuration and specifying the options for monitoring for the connection manager.- Parameters:
healthChecksConfiguration
- The health checks config to use- Returns:
- The builder of the method chaining.
-
connectionHealthConfiguration
AwsCrtAsyncHttpClient.Builder connectionHealthConfiguration(Consumer<ConnectionHealthConfiguration.Builder> healthChecksConfigurationBuilder) A convenience method that creates an instance of theConnectionHealthConfiguration
builder, avoiding the need to create one manually viaConnectionHealthConfiguration.builder()
.- Parameters:
healthChecksConfigurationBuilder
- The health checks config builder to use- Returns:
- The builder of the method chaining.
- See Also:
-
connectionMaxIdleTime
Configure the maximum amount of time that a connection should be allowed to remain open while idle.- Parameters:
connectionMaxIdleTime
- the maximum amount of connection idle time- Returns:
- The builder of the method chaining.
-
connectionTimeout
The amount of time to wait when initially establishing a connection before giving up and timing out.- Parameters:
connectionTimeout
- timeout- Returns:
- The builder of the method chaining.
-
tcpKeepAliveConfiguration
AwsCrtAsyncHttpClient.Builder tcpKeepAliveConfiguration(TcpKeepAliveConfiguration tcpKeepAliveConfiguration) Configure whether to enabletcpKeepAlive
and relevant configuration for all connections established by this client.By default, tcpKeepAlive is disabled. You can enable
tcpKeepAlive
by providing this configuration and specifying periodic TCP keepalive packet intervals and timeouts. This may be required for certain connections for longer durations than default socket timeouts.- Parameters:
tcpKeepAliveConfiguration
- The TCP keep-alive configuration to use- Returns:
- The builder of the method chaining.
-
tcpKeepAliveConfiguration
AwsCrtAsyncHttpClient.Builder tcpKeepAliveConfiguration(Consumer<TcpKeepAliveConfiguration.Builder> tcpKeepAliveConfigurationBuilder) Configure whether to enabletcpKeepAlive
and relevant configuration for all connections established by this client.A convenience method that creates an instance of the
TcpKeepAliveConfiguration
builder, avoiding the need to create one manually viaTcpKeepAliveConfiguration.builder()
.- Parameters:
tcpKeepAliveConfigurationBuilder
- The TCP keep-alive configuration builder to use- Returns:
- The builder of the method chaining.
- See Also:
-
postQuantumTlsEnabled
Configure whether to enable a hybrid post-quantum key exchange option for the Transport Layer Security (TLS) network encryption protocol when communicating with services that support Post Quantum TLS. If Post Quantum cipher suites are not supported on the platform, the SDK will use the default TLS cipher suites.See Using hybrid post-quantum TLS with AWS KMS
It's disabled by default.
- Parameters:
postQuantumTlsEnabled
- whether to prefer Post Quantum TLS- Returns:
- The builder of the method chaining.
-