Package io.micronaut.aws.sdk.v2.service
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>       
java.lang.Object
io.micronaut.aws.sdk.v2.service.AwsClientFactory<SB,AB,SC,AC>   
- Type Parameters:
- SB- The sync builder
- AB- The async builder
- SC- The sync client
- AC- The async client
- Direct Known Subclasses:
- ApiGatewayManagementApiClientFactory,- CloudwatchLogsClientFactory,- DynamoDbClientFactory,- S3ClientFactory,- SecretsManagerClientFactory,- ServiceDiscoveryAsyncClientFactory,- SesClientFactory,- SnsClientFactory,- SqsClientFactory,- SsmClientFactory
public 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 Object
Abstract class that eases creation of AWS client factories.
- Since:
- 2.0.0
- Author:
- Álvaro Sánchez-Mariscal
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final @Nullable AWSServiceConfigurationprotected final software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChainprotected final software.amazon.awssdk.regions.providers.AwsRegionProviderChainprotected final @Nullable UserAgentProvider
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAwsClientFactory(software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider, software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider, @Nullable UserAgentProvider userAgentProvider, @Nullable AWSServiceConfiguration configuration) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionasyncBuilder(software.amazon.awssdk.http.async.SdkAsyncHttpClient httpClient) Configures the builder so that it uses the appropriate HTTP client, credentials and region providers.asyncClient(AB builder) Creates the async client.protected abstract ABImplementations need to create the builder, eg:S3AsyncClient.builder();.protected abstract SBImplementations need to create the builder, eg:S3Client.builder();.syncBuilder(software.amazon.awssdk.http.SdkHttpClient httpClient) Configures the builder so that it uses the appropriate HTTP client, credentials and region providers.syncClient(SB builder) Creates the sync client.
- 
Field Details- 
credentialsProviderprotected final software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider
- 
regionProviderprotected final software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider
- 
configuration
- 
userAgentProvider
 
- 
- 
Constructor Details- 
AwsClientFactoryprotected AwsClientFactory(software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider, software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider, @Nullable @Nullable UserAgentProvider userAgentProvider, @Nullable @Nullable AWSServiceConfiguration configuration) Constructor.- Parameters:
- credentialsProvider- The credentials provider
- regionProvider- The region provider
- userAgentProvider- User-Agent Provider
- configuration- AWS Service Configuration
 
 
- 
- 
Method Details- 
syncBuilderConfigures the builder so that it uses the appropriate HTTP client, credentials and region providers. Subclasses may want to override this method and annotate it with@Singleton.- Parameters:
- httpClient- The sync HTTP client
- Returns:
- The sync builder
 
- 
syncClientCreates the sync client. It requires a bean of typeSB.- Parameters:
- builder- The sync builder
- Returns:
- The sync AWS client
- See Also:
 
- 
asyncBuilderConfigures the builder so that it uses the appropriate HTTP client, credentials and region providers. Subclasses may want to override this method and annotate it with@Singleton.- Parameters:
- httpClient- The async HTTP client
- Returns:
- The async builder
 
- 
asyncClientCreates the async client. It requires a bean of typeAB.- Parameters:
- builder- The async builder
- Returns:
- The async AWS client
 
- 
createSyncBuilderImplementations need to create the builder, eg:S3Client.builder();.- Returns:
- The sync builder
 
- 
createAsyncBuilderImplementations need to create the builder, eg:S3AsyncClient.builder();.- Returns:
- The async builder
 
 
-