Package com.amazonaws.services.s3

Examples of com.amazonaws.services.s3.AmazonS3Client


        ClientConfiguration cc = new ClientConfiguration();
        cc.setConnectionTimeout(connectionTimeOut);
        cc.setSocketTimeout(socketTimeOut);
        cc.setMaxConnections(maxConnections);
        cc.setMaxErrorRetry(maxErrorRetry);
        return new AmazonS3Client(credentials, cc);
    }
View Full Code Here


     *
     * @return AmazonS3Client
     */
    AmazonS3 createS3Client() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonS3 client = new AmazonS3Client(credentials);
        return client;
    }
View Full Code Here

     * @param credentialsProvider
     * @param bucketName The S3 bucket containing the configuration file.
     * @param key The key of the file within that bucket.
     */
    public S3ConfigurationSource(AWSCredentialsProvider credentialsProvider, String bucketName, String key) {
        this(new AmazonS3Client(credentialsProvider), bucketName, key);
    }
View Full Code Here

    }

    @Before
    public void setup() throws Exception {
        fakeS3 = createHttpServer();
        client = new AmazonS3Client(new StaticCredentialsProvider(new AnonymousAWSCredentials()));
        client.setS3ClientOptions(new S3ClientOptions().withPathStyleAccess(true));
        client.setEndpoint("http://localhost:8069");
    }
View Full Code Here

        }

        this.simpleDbClient = new AmazonSimpleDBClient(awsCredentials, createConfiguration(sdbSecure));
        this.simpleDbClient.setEndpoint(sdbEndpoint);

        this.s3Client = new AmazonS3Client(awsCredentials, createConfiguration(s3Secure));
        this.s3Client.setEndpoint(s3Endpoint);
    }
View Full Code Here

     *
     * @return AmazonS3Client
     */
    AmazonS3 createS3Client() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonS3 client = new AmazonS3Client(credentials);
        if (configuration.getAmazonS3Endpoint() != null) {
            client.setEndpoint(configuration.getAmazonS3Endpoint());
        }
        return client;
    }
View Full Code Here

     */
    public AmazonS3Client getClient(Region s3region) {
        if ( s3region == null ) {
            throw new IllegalArgumentException("S3 region must be specified");
        }
        AmazonS3Client client = clientsByRegion.get(s3region);
        if (client != null) {
            return client;
        }
        if (credentials == null) {
            throw new IllegalArgumentException("No client provided for S3 region: " + s3region);
        }
        client = new AmazonS3Client(credentials);
        client.setRegion(s3region.toAWSRegion());
        AmazonS3Client prev = clientsByRegion.putIfAbsent(s3region, client);
        return prev == null ? client : prev;
    }
View Full Code Here

     * them throughout applications.
     * <p>
     * TransferManager and all AWS client objects are thread safe.
     */
    public TransferManager(){
        this(new AmazonS3Client(new DefaultAWSCredentialsProviderChain()));
    }
View Full Code Here

     * @param credentialsProvider
     *            The AWS security credentials provider to use when making
     *            authenticated requests.
     */
    public TransferManager(AWSCredentialsProvider credentialsProvider) {
        this(new AmazonS3Client(credentialsProvider));
    }
View Full Code Here

     * @param credentials
     *            The AWS security credentials to use when making authenticated
     *            requests.
     */
    public TransferManager(AWSCredentials credentials) {
        this(new AmazonS3Client(credentials));
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.s3.AmazonS3Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.