Example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient AmazonEC2AsyncClient

List of usage examples for com.amazonaws.services.ec2 AmazonEC2AsyncClient AmazonEC2AsyncClient

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient AmazonEC2AsyncClient.

Prototype

AmazonEC2AsyncClient(AwsAsyncClientParams asyncClientParams) 

Source Link

Document

Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified parameters.

Usage

From source file:org.excalibur.service.aws.ec2.EC2.java

License:Open Source License

public EC2(UserProviderCredentials credentials) {
    this.credentials_ = checkNotNull(credentials);
    checkState(!isNullOrEmpty(credentials.getLoginCredentials().getCredentialName()));
    checkNotNull(credentials.getRegion());
    checkState(!isNullOrEmpty(credentials.getRegion().getName()));
    checkState(!isNullOrEmpty(credentials.getRegion().getEndpoint()));

    this.awsCredentials_ = new BasicAWSCredentials(credentials.getLoginCredentials().getIdentity(),
            credentials.getLoginCredentials().getCredential());

    ec2_ = new AmazonEC2AsyncClient(this.awsCredentials_);
    ec2_.setEndpoint(credentials.getRegion().getEndpoint());
    this.defaultUserGroupName_ = System.getProperty("org.excalibur.security.default.group.name",
            "excalibur-security-group");
    backoffLimitedRetryHandler_ = new BackoffLimitedRetryHandler();

}