BuilderT - The type of builder, for chaining.ClientT - The type of client generated by this builder.public abstract class AwsDefaultClientBuilder<BuilderT extends AwsClientBuilder<BuilderT,ClientT>,ClientT> extends SdkDefaultClientBuilder<BuilderT,ClientT> implements AwsClientBuilder<BuilderT,ClientT>
AwsClientBuilder, AwsAsyncClientBuilder and
AwsSyncClientBuilder. 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 AwsClientBuilders, this class is not thread safe.
SdkDefaultClientBuilder.NonManagedSdkAsyncHttpClient, SdkDefaultClientBuilder.NonManagedSdkHttpClient| Modifier and Type | Method and Description |
|---|---|
BuilderT |
credentialsProvider(AwsCredentialsProvider credentialsProvider)
Configure the credentials that should be used to authenticate with AWS.
|
BuilderT |
region(Region region)
Configure the region with which the SDK should communicate.
|
void |
setCredentialsProvider(AwsCredentialsProvider credentialsProvider) |
void |
setRegion(Region region) |
asyncConfiguration, build, endpointOverride, httpClient, httpClient, httpClientBuilder, httpClientBuilder, overrideConfiguration, setAsyncConfiguration, setEndpointOverride, setOverrideConfigurationequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendpointOverride, overrideConfiguration, overrideConfigurationapplyMutation, buildpublic final BuilderT region(Region region)
AwsClientBuilderIf this is not specified, the SDK will attempt to identify the endpoint automatically using the following logic:
region in interface AwsClientBuilder<BuilderT extends AwsClientBuilder<BuilderT,ClientT>,ClientT>public final void setRegion(Region region)
public final BuilderT credentialsProvider(AwsCredentialsProvider credentialsProvider)
AwsClientBuilderThe default provider will attempt to identify the credentials automatically using the following checks:
aws.accessKeyId and aws.secretKeyAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEYIf the credentials are not found in any of the locations above, an exception will be thrown at SdkBuilder.build() time.
credentialsProvider in interface AwsClientBuilder<BuilderT extends AwsClientBuilder<BuilderT,ClientT>,ClientT>public final void setCredentialsProvider(AwsCredentialsProvider credentialsProvider)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.