B
- The type of builder, for chaining.C
- The type of client generated by this builder.public abstract class AwsDefaultClientBuilder<B extends AwsClientBuilder<B,C>,C> extends SdkDefaultClientBuilder<B,C> implements AwsClientBuilder<B,C>
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 AwsClientBuilder
s, this class is not thread safe.
SdkDefaultClientBuilder.NonManagedSdkAsyncHttpClient, SdkDefaultClientBuilder.NonManagedSdkHttpClient
Modifier and Type | Method and Description |
---|---|
B |
credentialsProvider(AwsCredentialsProvider credentialsProvider)
Configure the credentials that should be used to authenticate with AWS.
|
B |
endpointOverride(URI endpointOverride)
Configure the endpoint with which the SDK should communicate.
|
B |
overrideConfiguration(ClientOverrideConfiguration overrideConfiguration)
Specify overrides to the default SDK configuration that should be used for clients created by this builder.
|
B |
region(Region region)
Configure the region with which the SDK should communicate.
|
void |
setCredentialsProvider(AwsCredentialsProvider credentialsProvider) |
void |
setRegion(Region region) |
asyncExecutorProvider, asyncHttpConfiguration, build, httpConfiguration, setAsyncExecutorProvider, setAsyncHttpConfiguration, setEndpointOverride, setHttpConfiguration, setOverrideConfiguration
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
overrideConfiguration
apply, build
public B endpointOverride(URI endpointOverride)
SdkClientBuilder
endpointOverride
in interface SdkClientBuilder<B extends AwsClientBuilder<B,C>,C>
endpointOverride
in class SdkDefaultClientBuilder<B extends AwsClientBuilder<B,C>,C>
public final B overrideConfiguration(ClientOverrideConfiguration overrideConfiguration)
SdkClientBuilder
overrideConfiguration
in interface SdkClientBuilder<B extends AwsClientBuilder<B,C>,C>
overrideConfiguration
in class SdkDefaultClientBuilder<B extends AwsClientBuilder<B,C>,C>
public final B region(Region region)
AwsClientBuilder
If this is not specified, the SDK will attempt to identify the endpoint automatically using the following logic:
region
in interface AwsClientBuilder<B extends AwsClientBuilder<B,C>,C>
public final void setRegion(Region region)
public final B credentialsProvider(AwsCredentialsProvider credentialsProvider)
AwsClientBuilder
The default provider will attempt to identify the credentials automatically using the following checks:
aws.accessKeyId
and aws.secretKey
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
If the credentials are not found in any of the locations above, an exception will be thrown at SdkBuilder.build()
time.
credentialsProvider
in interface AwsClientBuilder<B extends AwsClientBuilder<B,C>,C>
public final void setCredentialsProvider(AwsCredentialsProvider credentialsProvider)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.