CopyableBuilder<ClientAsyncHttpConfiguration.Builder,ClientAsyncHttpConfiguration>
, SdkBuilder<ClientAsyncHttpConfiguration.Builder,ClientAsyncHttpConfiguration>
public static interface ClientAsyncHttpConfiguration.Builder extends CopyableBuilder<ClientAsyncHttpConfiguration.Builder,ClientAsyncHttpConfiguration>
ClientAsyncHttpConfiguration
.
All implementations of this interface are mutable and not thread safe.
Modifier and Type | Method | Description |
---|---|---|
SdkBuilder<?,ClientAsyncHttpConfiguration> |
httpClient(SdkAsyncHttpClient sdkHttpClient) |
Sets the
SdkAsyncHttpClient that the SDK service client will use to make HTTP calls. |
SdkBuilder<?,ClientAsyncHttpConfiguration> |
httpClientFactory(SdkAsyncHttpClientFactory sdkClientFactory) |
Sets a custom HTTP client factory that will be used to obtain a configured instance of
SdkAsyncHttpClient . |
copy
apply, build
SdkBuilder<?,ClientAsyncHttpConfiguration> httpClient(SdkAsyncHttpClient sdkHttpClient)
SdkAsyncHttpClient
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. 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(SdkAsyncHttpClientFactory)
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<?,ClientAsyncHttpConfiguration> httpClientFactory(SdkAsyncHttpClientFactory sdkClientFactory)
SdkAsyncHttpClient
. 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.