Interface AwsCrtHttpClient.Builder
-
- All Superinterfaces:
Buildable
,SdkBuilder<AwsCrtHttpClient.Builder,SdkHttpClient>
,SdkHttpClient.Builder<AwsCrtHttpClient.Builder>
- Enclosing class:
- AwsCrtHttpClient
public static interface AwsCrtHttpClient.Builder extends SdkHttpClient.Builder<AwsCrtHttpClient.Builder>
Builder that allows configuration of the AWS CRT HTTP implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AwsCrtHttpClient.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()
.AwsCrtHttpClient.Builder
connectionHealthConfiguration(ConnectionHealthConfiguration healthChecksConfiguration)
Configure the health checks for all connections established by this client.AwsCrtHttpClient.Builder
connectionMaxIdleTime(Duration connectionMaxIdleTime)
Configure the maximum amount of time that a connection should be allowed to remain open while idle.AwsCrtHttpClient.Builder
connectionTimeout(Duration connectionTimeout)
The amount of time to wait when initially establishing a connection before giving up and timing out.AwsCrtHttpClient.Builder
maxConcurrency(Integer maxConcurrency)
The Maximum number of allowed concurrent requests.AwsCrtHttpClient.Builder
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.AwsCrtHttpClient.Builder
proxyConfiguration(Consumer<ProxyConfiguration.Builder> proxyConfigurationBuilderConsumer)
Sets the http proxy configuration to use for this client.AwsCrtHttpClient.Builder
proxyConfiguration(ProxyConfiguration proxyConfiguration)
Sets the http proxy configuration to use for this client.AwsCrtHttpClient.Builder
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.AwsCrtHttpClient.Builder
tcpKeepAliveConfiguration(Consumer<TcpKeepAliveConfiguration.Builder> tcpKeepAliveConfigurationBuilder)
Configure whether to enabletcpKeepAlive
and relevant configuration for all connections established by this client.AwsCrtHttpClient.Builder
tcpKeepAliveConfiguration(TcpKeepAliveConfiguration tcpKeepAliveConfiguration)
Configure whether to enabletcpKeepAlive
and relevant configuration for all connections established by this client.-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Methods inherited from interface software.amazon.awssdk.http.SdkHttpClient.Builder
build, buildWithDefaults
-
-
-
-
Method Detail
-
maxConcurrency
AwsCrtHttpClient.Builder maxConcurrency(Integer 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
AwsCrtHttpClient.Builder 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.- Parameters:
readBufferSize
- The number of bytes that can be buffered.- Returns:
- The builder of the method chaining.
-
proxyConfiguration
AwsCrtHttpClient.Builder proxyConfiguration(ProxyConfiguration 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
AwsCrtHttpClient.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
AwsCrtHttpClient.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
AwsCrtHttpClient.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:
connectionHealthConfiguration(ConnectionHealthConfiguration)
-
connectionMaxIdleTime
AwsCrtHttpClient.Builder connectionMaxIdleTime(Duration 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
AwsCrtHttpClient.Builder connectionTimeout(Duration 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
AwsCrtHttpClient.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
AwsCrtHttpClient.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:
tcpKeepAliveConfiguration(TcpKeepAliveConfiguration)
-
postQuantumTlsEnabled
AwsCrtHttpClient.Builder 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. 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.
-
-