CopyableBuilder<ClientHttpConfiguration.Builder,ClientHttpConfiguration>
, SdkBuilder<ClientHttpConfiguration.Builder,ClientHttpConfiguration>
public static interface ClientHttpConfiguration.Builder extends CopyableBuilder<ClientHttpConfiguration.Builder,ClientHttpConfiguration>
ClientHttpConfiguration
.
All implementations of this interface are mutable and not thread safe.
Modifier and Type | Method | Description |
---|---|---|
SdkBuilder<?,ClientHttpConfiguration> |
httpClient(SdkHttpClient sdkHttpClient) |
Sets the
SdkHttpClient that the SDK service client will use to make HTTP calls. |
SdkBuilder<?,ClientHttpConfiguration> |
httpClientFactory(SdkHttpClientFactory sdkClientFactory) |
Sets a custom HTTP client factory that will be used to obtain a configured instance of
SdkHttpClient . |
copy
apply, build
SdkBuilder<?,ClientHttpConfiguration> httpClient(SdkHttpClient sdkHttpClient)
SdkHttpClient
that the SDK service client will use to make HTTP calls. This HTTP client may be shared
between multiple SDK service clients to share a common connection pool. To create a client you must use an
implementation specific builder/factory, the default implementation for the SDK is ApacheSdkHttpClientFactory
. Note that this method is only recommended when you
wish to share an HTTP client across multiple SDK service clients. If you do not wish to share HTTP clients, it is
recommended to use httpClientFactory(SdkHttpClientFactory)
so that service specific default configuration may
be applied.
This client must be closed by the client when it is ready to be disposed. The SDK will not close the HTTP client when the service client is closed.
SdkBuilder<?,ClientHttpConfiguration> httpClientFactory(SdkHttpClientFactory sdkClientFactory)
SdkHttpClient
. Any
service specific HTTP configuration will be merged with the factory's configuration prior to creating the client. When
there is no desire to share HTTP clients across multiple service clients, the client factory is the preferred way to
customize the HTTP client as it benefits from service specific defaults.
Clients created by the factory are managed by the SDK and will be closed when the service client is closed.
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.