public static interface UrlConnectionHttpClient.Builder extends SdkHttpClient.Builder<UrlConnectionHttpClient.Builder>
SdkHttpClient that uses JDKs build-in URLConnection HTTP
implementation. A builder can be created via UrlConnectionHttpClient.builder().
SdkHttpClient httpClient = UrlConnectionHttpClient.builder() .socketTimeout(Duration.ofSeconds(10)) .connectionTimeout(Duration.ofSeconds(1)) .build();
| Modifier and Type | Method and Description |
|---|---|
UrlConnectionHttpClient.Builder |
connectionTimeout(Duration connectionTimeout)
The amount of time to wait when initially establishing a connection before giving up and timing out.
|
UrlConnectionHttpClient.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.
|
UrlConnectionHttpClient.Builder |
tlsKeyManagersProvider(TlsKeyManagersProvider tlsKeyManagersProvider)
Configure the
TlsKeyManagersProvider that will provide the KeyManagers to use
when constructing the SSL context. |
UrlConnectionHttpClient.Builder |
tlsTrustManagersProvider(TlsTrustManagersProvider tlsTrustManagersProvider)
Configure the
TlsTrustManagersProvider that will provide the TrustManagers to use
when constructing the SSL context. |
build, buildWithDefaultsapplyMutationUrlConnectionHttpClient.Builder socketTimeout(Duration socketTimeout)
UrlConnectionHttpClient.Builder connectionTimeout(Duration connectionTimeout)
UrlConnectionHttpClient.Builder tlsKeyManagersProvider(TlsKeyManagersProvider tlsKeyManagersProvider)
TlsKeyManagersProvider that will provide the KeyManagers to use
when constructing the SSL context.UrlConnectionHttpClient.Builder tlsTrustManagersProvider(TlsTrustManagersProvider tlsTrustManagersProvider)
TlsTrustManagersProvider that will provide the TrustManagers to use
when constructing the SSL context.Copyright © 2021. All rights reserved.