Example usage for com.amazonaws.services.devicefarm.model ArgumentException ArgumentException

List of usage examples for com.amazonaws.services.devicefarm.model ArgumentException ArgumentException

Introduction

In this page you can find the example usage for com.amazonaws.services.devicefarm.model ArgumentException ArgumentException.

Prototype

public ArgumentException(String message) 

Source Link

Document

Constructs a new ArgumentException with the specified error message.

Usage

From source file:com.hpe.caf.worker.datastore.s3.S3DataStore.java

License:Apache License

public S3DataStore(final S3DataStoreConfiguration s3DataStoreConfiguration) {
    if (s3DataStoreConfiguration == null) {
        throw new ArgumentException("s3DataStoreConfiguration was null.");
    }// ww w . j  a  va  2  s . c o m

    ClientConfiguration clientCfg = new ClientConfiguration();

    if (!StringUtils.isNullOrEmpty(s3DataStoreConfiguration.getProxyHost())) {
        clientCfg.setProtocol(Protocol.valueOf(s3DataStoreConfiguration.getProxyProtocol()));
        clientCfg.setProxyHost(s3DataStoreConfiguration.getProxyHost());
        clientCfg.setProxyPort(s3DataStoreConfiguration.getProxyPort());
    }
    AWSCredentials credentials = new BasicAWSCredentials(s3DataStoreConfiguration.getAccessKey(),
            s3DataStoreConfiguration.getSecretKey());
    bucketName = s3DataStoreConfiguration.getBucketName();
    amazonS3Client = new AmazonS3Client(credentials, clientCfg);
    amazonS3Client.setBucketAccelerateConfiguration(new SetBucketAccelerateConfigurationRequest(bucketName,
            new BucketAccelerateConfiguration(BucketAccelerateStatus.Enabled)));
}