Package org.jets3t.service.impl.rest.httpclient

Examples of org.jets3t.service.impl.rest.httpclient.RestS3Service


            "Secret Access Key must be specified " +
            "as the password of a s3 URL, or by setting the " +
            "fs.s3.awsSecretAccessKey property.");       
      }
      AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretAccessKey);
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      if (e.getCause() instanceof IOException) {
        throw (IOException) e.getCause();
      }
      throw new S3Exception(e);
View Full Code Here


    s3Credentials.initialize(uri, conf);
    try {
      AWSCredentials awsCredentials =
        new AWSCredentials(s3Credentials.getAccessKey(),
            s3Credentials.getSecretAccessKey());
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      handleS3ServiceException(e);
    }
    bucket = new S3Bucket(uri.getHost());
  }
View Full Code Here

                    jets3tProperties.setProperty("httpclient.proxy-autodetect", "false");
                    jets3tProperties.setProperty("httpclient.proxy-host", proxyInfo.getHost());
                    jets3tProperties.setProperty("httpclient.proxy-port", new Integer(proxyInfo.getPort()).toString());
                }
            }
            this.service = new RestS3Service(getCredentials(authenticationInfo), "mavens3wagon", null, jets3tProperties);
        } catch (S3ServiceException e) {
            throw new AuthenticationException("Cannot authenticate with current credentials", e);
        }
        this.bucket = source.getHost();
        this.basedir = getBaseDir(source);
View Full Code Here

  @Provides
  @LazySingleton
  public RestS3Service getRestS3Service(AWSCredentialsProvider provider)
  {
    if(provider.getCredentials() instanceof com.amazonaws.auth.AWSSessionCredentials) {
      return new RestS3Service(new AWSSessionCredentialsAdapter(provider));
    } else {
      return new RestS3Service(new AWSCredentials(
          provider.getCredentials().getAWSAccessKeyId(),
          provider.getCredentials().getAWSSecretKey()
      ));
    }
  }
View Full Code Here

            "Secret Access Key must be specified " +
            "as the password of a s3 URL, or by setting the " +
            "fs.s3.awsSecretAccessKey property.");       
      }
      AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretAccessKey);
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      if (e.getCause() instanceof IOException) {
        throw (IOException) e.getCause();
      }
      throw new S3Exception(e);
View Full Code Here

                S3FileChooser.this.s3Tree.clean();

                try {

                    // create S3Service
                    S3Service s3Service = new RestS3Service(new AWSCredentials(AmazonCredential.getInstance()
                            .getAwsAccessKeyId(), AmazonCredential.getInstance().getAwsSecretAccessKey()));

                    BucketsLoader bucketsLoader = new BucketsLoader(S3FileChooser.this.engine,
                            S3FileChooser.this.dialog.getDialog());
                    bucketsLoader.load(s3Service, S3FileChooser.this.s3Tree);
View Full Code Here

      String bucketName = getProperty(job, P_BUCKET_NAME);

      // Instantiate JetS3t classes
      AWSCredentials awsCredentials = new AWSCredentials(awsAccessKeyId,
          awsSecretAccessKey);
      service = new RestS3Service(awsCredentials);
      // enable requester pays feature flag
      //service.setRequesterPaysEnabled(true);
      bucket = new S3Bucket(bucketName);

      maxTries = job.getInt(P_MAX_TRIES, 4);
View Full Code Here

    private S3Service getS3Service() {
        org.jets3t.service.security.AWSCredentials awsCredentials = new org.jets3t.service.security.AWSCredentials(awsAccessKey, awsSecretKey);
        S3Service s3Service;
        try {
            s3Service = new RestS3Service(awsCredentials);
        } catch (S3ServiceException e) {
            log.error("S3ServiceException attempting to create RestS3Service", e);
            return null;
        }
View Full Code Here

 
  // internal helpers
 
  private S3Service createS3Service() {
    try {
      return new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      throw new IllegalArgumentException("Unable to init REST-based S3Service with provided credentials", e);
    }
  }
View Full Code Here

  AWSCredentials awsCredentials = new AWSCredentials( accessKeyId,
    secretKey );
 
  try
  {
      _jetS3 = new RestS3Service( awsCredentials );
  }
  catch ( S3ServiceException e )
  {
      throw new RuntimeException( e );
  }
View Full Code Here

TOP

Related Classes of org.jets3t.service.impl.rest.httpclient.RestS3Service

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.