B - The type of builder, for chaining.C - The type of client generated by this builder.ClientBuilder<B,C>, SdkBuilder<B,C>public abstract class DefaultClientBuilder<B extends ClientBuilder<B,C>,C> extends Object implements ClientBuilder<B,C>
ClientBuilder, AsyncClientBuilder and
SyncClientBuilder. 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 ClientBuilders, this class is not thread safe.
| Modifier and Type | Method | Description |
|---|---|---|
B |
asyncExecutorProvider(ExecutorProvider asyncExecutorProvider) |
|
B |
asyncHttpConfiguration(ClientAsyncHttpConfiguration asyncHttpConfiguration) |
|
C |
build() |
Build a client using the current state of this builder.
|
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 |
httpConfiguration(ClientHttpConfiguration httpConfiguration) |
|
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 |
setAsyncExecutorProvider(ExecutorProvider asyncExecutorProvider) |
|
void |
setAsyncHttpConfiguration(ClientAsyncHttpConfiguration asyncHttpConfiguration) |
|
void |
setCredentialsProvider(AwsCredentialsProvider credentialsProvider) |
|
void |
setEndpointOverride(URI endpointOverride) |
|
void |
setHttpConfiguration(ClientHttpConfiguration httpConfiguration) |
|
void |
setOverrideConfiguration(ClientOverrideConfiguration overrideConfiguration) |
|
void |
setRegion(Region region) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplypublic final C build()
buildClient() method, that
accepts the immutable client configuration generated by this build method.build in interface SdkBuilder<B extends ClientBuilder<B,C>,C>public final B region(Region region)
ClientBuilderIf this is not specified, the SDK will attempt to identify the endpoint automatically using the following logic:
region in interface ClientBuilder<B extends ClientBuilder<B,C>,C>public final void setRegion(Region region)
public B endpointOverride(URI endpointOverride)
ClientBuilderClientBuilder.region(Region). Even when this is used, the ClientBuilder.region(Region) must still be specified for the purposes of
message signing.endpointOverride in interface ClientBuilder<B extends ClientBuilder<B,C>,C>public void setEndpointOverride(URI endpointOverride)
public B asyncExecutorProvider(ExecutorProvider asyncExecutorProvider)
public void setAsyncExecutorProvider(ExecutorProvider asyncExecutorProvider)
public final B overrideConfiguration(ClientOverrideConfiguration overrideConfiguration)
ClientBuilderoverrideConfiguration in interface ClientBuilder<B extends ClientBuilder<B,C>,C>public final void setOverrideConfiguration(ClientOverrideConfiguration overrideConfiguration)
public final B httpConfiguration(ClientHttpConfiguration httpConfiguration)
public final void setHttpConfiguration(ClientHttpConfiguration httpConfiguration)
public final B asyncHttpConfiguration(ClientAsyncHttpConfiguration asyncHttpConfiguration)
public final void setAsyncHttpConfiguration(ClientAsyncHttpConfiguration asyncHttpConfiguration)
public final B credentialsProvider(AwsCredentialsProvider credentialsProvider)
ClientBuilderThe 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 ClientBuilder<B extends ClientBuilder<B,C>,C>public final void setCredentialsProvider(AwsCredentialsProvider credentialsProvider)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.