Class SdkDefaultClientBuilder<B extends SdkClientBuilder<B,C>,C>
- Type Parameters:
B- The type of builder, for chaining.C- The type of client generated by this builder.
- All Implemented Interfaces:
SdkClientBuilder<B,,C> Buildable,SdkBuilder<B,C>
- Direct Known Subclasses:
AwsDefaultClientBuilder
SdkClientBuilder, SdkAsyncClientBuilder and
SdkSyncClientBuilder. This implements all methods required by those interfaces, allowing service-specific builders to
just implement the configuration they wish to add.
By implementing both the sync and async interface's methods, service-specific builders can share code between their sync and async variants without needing one to extend the other. Note: This only defines the methods in the sync and async builder interfaces. It does not implement the interfaces themselves. This is because the sync and async client builder interfaces both require a type-constrained parameter for use in fluent chaining, and a generic type parameter conflict is introduced into the class hierarchy by this interface extending the builder interfaces themselves.
Like all SdkClientBuilders, this class is not thread safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWrapper aroundSdkAsyncHttpClientto prevent it from being closed.static final classWrapper aroundSdkHttpClientto prevent it from being closed. -
Method Summary
Modifier and TypeMethodDescriptionfinal BAdds a plugin to the client builder.final BasyncConfiguration(ClientAsyncConfiguration asyncConfiguration) final Cbuild()Build a client using the current state of this builder.final BendpointOverride(URI endpointOverride) Configure the endpoint with which the SDK should communicate.final BhttpClient(SdkAsyncHttpClient httpClient) final BhttpClient(SdkHttpClient httpClient) final BhttpClientBuilder(SdkAsyncHttpClient.Builder httpClientBuilder) final BhttpClientBuilder(SdkHttpClient.Builder httpClientBuilder) final BmetricPublishers(List<MetricPublisher> metricPublishers) Retrieve the current override configuration.final BoverrideConfiguration(ClientOverrideConfiguration overrideConfig) Specify overrides to the default SDK configuration that should be used for clients created by this builder.plugins()Returns the list of plugins configured on the client builder.final voidsetAsyncConfiguration(ClientAsyncConfiguration asyncConfiguration) final voidsetEndpointOverride(URI endpointOverride) final voidsetOverrideConfiguration(ClientOverrideConfiguration overrideConfiguration) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutationMethods inherited from interface software.amazon.awssdk.core.client.builder.SdkClientBuilder
overrideConfiguration, putAuthScheme
-
Method Details
-
build
Build a client using the current state of this builder. This is marked final in order to allow this class to add standard "build" logic between all service clients. Service clients are expected to implement thebuildClient()method, that accepts the immutable client configuration generated by this build method.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<B extends SdkClientBuilder<B,C>, C> - Returns:
- an instance of T
-
endpointOverride
Description copied from interface:SdkClientBuilderConfigure the endpoint with which the SDK should communicate.It is important to know that
EndpointProviders and the endpoint override on the client are not mutually exclusive. In all existing cases, the endpoint override is passed as a parameter to the provider and the provider *may* modify it. For example, the S3 provider may add the bucket name as a prefix to the endpoint override for virtual bucket addressing.- Specified by:
endpointOverridein interfaceSdkClientBuilder<B extends SdkClientBuilder<B,C>, C>
-
setEndpointOverride
-
asyncConfiguration
-
setAsyncConfiguration
-
overrideConfiguration
Description copied from interface:SdkClientBuilderSpecify overrides to the default SDK configuration that should be used for clients created by this builder.- Specified by:
overrideConfigurationin interfaceSdkClientBuilder<B extends SdkClientBuilder<B,C>, C>
-
setOverrideConfiguration
-
overrideConfiguration
Description copied from interface:SdkClientBuilderRetrieve the current override configuration. This allows further overrides across calls. Can be modified by first converting to a builder withClientOverrideConfiguration.toBuilder().- Specified by:
overrideConfigurationin interfaceSdkClientBuilder<B extends SdkClientBuilder<B,C>, C> - Returns:
- The existing override configuration for the builder.
-
httpClient
-
httpClientBuilder
-
httpClient
-
httpClientBuilder
-
metricPublishers
-
addPlugin
Description copied from interface:SdkClientBuilderAdds a plugin to the client builder. The plugins will be invoked when building the client to allow them to change the configuration of the built client.- Specified by:
addPluginin interfaceSdkClientBuilder<B extends SdkClientBuilder<B,C>, C>
-
plugins
Description copied from interface:SdkClientBuilderReturns the list of plugins configured on the client builder.- Specified by:
pluginsin interfaceSdkClientBuilder<B extends SdkClientBuilder<B,C>, C>
-