Package com.amazonaws.services.s3

Examples of com.amazonaws.services.s3.AmazonS3Client


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


  }
 
  public static  AmazonS3 getS3(){
    if (s3==null){
      try {
        s3=new AmazonS3Client(new PropertiesCredentials(Constants.class.getResourceAsStream("../AwsCredentials.properties")));
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
     
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

        return summary.getKey().startsWith(metadataFilePrefix);
    }

    private AmazonS3Client createS3Client() {
        if (s3AccessKey != null || s3SecretKey != null) {
            return new AmazonS3Client(new BasicAWSCredentials(s3AccessKey, s3SecretKey));
        } else {
            return new AmazonS3Client(new DefaultAWSCredentialsProviderChain());
        }
    }
View Full Code Here

      provider = new StaticCredentialsProvider(credentials);
    } else {
      provider = new DefaultAWSCredentialsProviderChain();
    }

    return new AmazonS3Client(provider);
  }
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

   * @param bucket the name of the S3 bucket
   */
  public AWSFileStore(String bucket) {
    this.bucket = bucket;
    this.awsCredentials = new BasicAWSCredentials(Config.AWS_ACCESSKEY, Config.AWS_SECRETKEY);
    this.s3 = new AmazonS3Client(awsCredentials);
  }
View Full Code Here

        return new LocalYumRepoFacade(stagingDirectory, createrepo, getLog());
    }

    private AmazonS3Client createS3Client() {
        if (s3AccessKey != null || s3SecretKey != null) {
            return new AmazonS3Client(new BasicAWSCredentials(s3AccessKey, s3SecretKey));
        } else {
            return new AmazonS3Client(new DefaultAWSCredentialsProviderChain());
        }
    }
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.