public final class UrlConnectionHttpClient extends Object implements SdkHttpClient
SdkHttpClient that uses HttpURLConnection to communicate with the service. This is the
leanest synchronous client that optimizes for minimum dependencies and startup latency in exchange for having less
functionality than other implementations.
See software.amazon.awssdk.http.apache.ApacheHttpClient for an alternative implementation.
This can be created via builder()
| Modifier and Type | Class and Description |
|---|---|
static interface |
UrlConnectionHttpClient.Builder
A builder for an instance of
SdkHttpClient that uses JDKs build-in URLConnection HTTP
implementation. |
| Modifier and Type | Method and Description |
|---|---|
static UrlConnectionHttpClient.Builder |
builder() |
void |
close() |
<T> Optional<T> |
getConfigurationValue(SdkHttpConfigurationOption<T> key)
Retrieve the current value of the configuration option, if present.
|
AbortableCallable<SdkHttpFullResponse> |
prepareRequest(SdkHttpFullRequest request,
SdkRequestContext requestContext)
Create a
AbortableCallable that can be used to execute the HTTP request. |
public static UrlConnectionHttpClient.Builder builder()
public AbortableCallable<SdkHttpFullResponse> prepareRequest(SdkHttpFullRequest request, SdkRequestContext requestContext)
SdkHttpClientAbortableCallable that can be used to execute the HTTP request.prepareRequest in interface SdkHttpClientrequest - Representation of an HTTP request.requestContext - Contains any extra dependencies needed.public <T> Optional<T> getConfigurationValue(SdkHttpConfigurationOption<T> key)
ConfigurationProvidergetConfigurationValue in interface ConfigurationProviderT - Type of configuration value.key - Key of configuration value to retrieve.Optional if configuration option is not supported, otherwise a fulfilled Optional containing the current value.public void close()
SdkAutoCloseableclose in interface AutoCloseableclose in interface SdkAutoCloseableCopyright © 2017 Amazon Web Services, Inc. All Rights Reserved.