B- The type of builder that should be returned by the fluent builder methods in this interface.
C- The type of client generated by this builder.
public interface SdkSyncClientBuilder<B extends SdkSyncClientBuilder<B,C>,C>
Implementations of this interface are mutable and not thread-safe.
|Modifier and Type||Method and Description|
B httpClient(SdkHttpClient httpClient)
SdkHttpClientthat 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. 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
httpClientBuilder(SdkHttpClient.Builder)so that service-specific default configuration may be applied.
This client must be closed by the user when it is ready to be disposed. The SDK will not close the HTTP client when the service client is closed.
B httpClientBuilder(SdkHttpClient.Builder httpClientBuilder)
SdkHttpClient.Builderthat will be used to obtain a configured instance of
SdkHttpClient. Any service-specific HTTP configuration will be merged with the builder's configuration prior to creating the client. When there is no desire to share HTTP clients across multiple service clients, the client builder is the preferred way to customize the HTTP client as it benefits from service-specific default configuration.
Clients created by the builder are managed by the SDK and will be closed when the service client is closed.
Copyright © 2019 Amazon Web Services, Inc. All Rights Reserved.