public final class ApacheHttpClient extends Object implements SdkHttpClient
SdkHttpClient that uses Apache HTTP client to communicate with the service. This is the most
powerful synchronous client that adds an extra dependency and additional startup latency in exchange for more functionality,
like support for HTTP proxies.
See software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient for an alternative implementation.
This can be created via builder()
| Modifier and Type | Class and Description |
|---|---|
static interface |
ApacheHttpClient.Builder
Builder for creating an instance of
SdkHttpClient. |
| Modifier and Type | Method and Description |
|---|---|
static ApacheHttpClient.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 context)
Create a
AbortableCallable that can be used to execute the HTTP request. |
public static ApacheHttpClient.Builder builder()
public AbortableCallable<SdkHttpFullResponse> prepareRequest(SdkHttpFullRequest request, SdkRequestContext context)
SdkHttpClientAbortableCallable that can be used to execute the HTTP request.prepareRequest in interface SdkHttpClientrequest - Representation of an HTTP request.context - 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.