SB
- The sync builderAB
- The async builderSC
- The sync clientAC
- The async clientpublic abstract class AwsClientFactory<SB extends software.amazon.awssdk.awscore.client.builder.AwsSyncClientBuilder<SB,SC> & software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<SB,SC>,AB extends software.amazon.awssdk.awscore.client.builder.AwsAsyncClientBuilder<AB,AC> & software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<AB,AC>,SC,AC extends software.amazon.awssdk.core.SdkClient>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain |
credentialsProvider |
protected software.amazon.awssdk.regions.providers.AwsRegionProviderChain |
regionProvider |
Modifier | Constructor and Description |
---|---|
protected |
AwsClientFactory(software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider,
software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AB |
asyncBuilder(software.amazon.awssdk.http.async.SdkAsyncHttpClient httpClient)
Configures the builder so that it uses the appropriate HTTP client, credentials and region providers.
|
AC |
asyncClient(AB builder)
Creates the async client.
|
protected abstract AB |
createAsyncBuilder()
Implementations need to create the builder, eg:
S3AsyncClient.builder(); . |
protected abstract SB |
createSyncBuilder()
Implementations need to create the builder, eg:
S3Client.builder(); . |
SB |
syncBuilder(software.amazon.awssdk.http.SdkHttpClient httpClient)
Configures the builder so that it uses the appropriate HTTP client, credentials and region providers.
|
SC |
syncClient(SB builder)
Creates the sync client.
|
protected final software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider
protected final software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider
protected AwsClientFactory(software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider, software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider)
credentialsProvider
- The credentials providerregionProvider
- The region providerpublic SB syncBuilder(software.amazon.awssdk.http.SdkHttpClient httpClient)
@Singleton
.httpClient
- The sync HTTP clientpublic SC syncClient(SB builder)
SB
.builder
- The sync buildersyncBuilder(SdkHttpClient)
public AB asyncBuilder(software.amazon.awssdk.http.async.SdkAsyncHttpClient httpClient)
@Singleton
.httpClient
- The async HTTP clientpublic AC asyncClient(AB builder)
AB
.builder
- The async builderprotected abstract SB createSyncBuilder()
S3Client.builder();
.protected abstract AB createAsyncBuilder()
S3AsyncClient.builder();
.