Example usage for com.amazonaws.services.simpleemail AmazonSimpleEmailServiceAsyncClient asyncBuilder

List of usage examples for com.amazonaws.services.simpleemail AmazonSimpleEmailServiceAsyncClient asyncBuilder

Introduction

In this page you can find the example usage for com.amazonaws.services.simpleemail AmazonSimpleEmailServiceAsyncClient asyncBuilder.

Prototype

public static AmazonSimpleEmailServiceAsyncClientBuilder asyncBuilder() 

Source Link

Usage

From source file:com.adeptj.modules.aws.ses.internal.AwsSesService.java

License:Apache License

@Activate
protected void start(EmailConfig emailConfig) {
    this.emailConfig = emailConfig;
    try {//w  w  w  .jav  a2s .  co m
        this.asyncSES = AmazonSimpleEmailServiceAsyncClient.asyncBuilder()
                .withEndpointConfiguration(
                        AwsUtil.getEndpointConfig(emailConfig.serviceEndpoint(), emailConfig.signingRegion()))
                .withCredentials(
                        AwsUtil.getCredentialsProvider(emailConfig.accessKey(), emailConfig.secretKey()))
                .build();
    } catch (Exception ex) {
        LOGGER.error("Exception while starting EmailService!!", ex);
        throw new AwsException(ex.getMessage(), ex);
    }
}