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 builderAB- The async builderSC- The sync clientAC- 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 Summary
FieldsModifier and TypeFieldDescriptionprotected final @Nullable AWSServiceConfigurationprotected final software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChainprotected final software.amazon.awssdk.regions.providers.AwsRegionProviderChainprotected final @Nullable UserAgentProvider - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAwsClientFactory(software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider, software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider, @Nullable UserAgentProvider userAgentProvider, @Nullable AWSServiceConfiguration configuration) Constructor. - 
Method Summary
Modifier 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
- 
credentialsProvider
protected final software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain credentialsProvider - 
regionProvider
protected final software.amazon.awssdk.regions.providers.AwsRegionProviderChain regionProvider - 
configuration
 - 
userAgentProvider
 
 - 
 - 
Constructor Details
- 
AwsClientFactory
protected 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 providerregionProvider- The region provideruserAgentProvider- User-Agent Providerconfiguration- AWS Service Configuration
 
 - 
 - 
Method Details
- 
syncBuilder
Configures 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
 
 - 
syncClient
Creates the sync client. It requires a bean of typeSB.- Parameters:
 builder- The sync builder- Returns:
 - The sync AWS client
 - See Also:
 
 - 
asyncBuilder
Configures 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
 
 - 
asyncClient
Creates the async client. It requires a bean of typeAB.- Parameters:
 builder- The async builder- Returns:
 - The async AWS client
 
 - 
createSyncBuilder
Implementations need to create the builder, eg:S3Client.builder();.- Returns:
 - The sync builder
 
 - 
createAsyncBuilder
Implementations need to create the builder, eg:S3AsyncClient.builder();.- Returns:
 - The async builder
 
 
 -