Package com.amazonaws.auth

Examples of com.amazonaws.auth.PropertiesCredentials


   
  if(authentication == null){
    InputStream awsCredInpStr = getClass().getClassLoader().getResourceAsStream(awsCredentialsProperties);
    if (awsCredInpStr == null)
      LOG.info("AWS Credentials File was not found on the classpath!");
      AWSCredentials credentials = new PropertiesCredentials(awsCredInpStr);
      setConf(credentials);
  }
  return (AWSCredentials)authentication;
  }
View Full Code Here


  public String initSession() throws StorageCloudException {

    try {
      String mprops = "accessKey=" + accessKey + "\r\n"
          + "secretKey = " + secretKey;
      PropertiesCredentials b = new PropertiesCredentials( new ByteArrayInputStream(mprops.getBytes()));

      conn = new AmazonS3Client(b);   
      conn.setEndpoint("http://s3.amazonaws.com"); //Para virtual Box funcionar

View Full Code Here

  }
 
  public static AmazonSimpleDB getSDB(){
    if (SDB==null){
      try {
        SDB=new AmazonSimpleDBClient(new PropertiesCredentials(
            Constants.class.
            getResourceAsStream("../AwsCredentials.properties")));
        return SDB;
      } catch (IOException e) {
        e.printStackTrace();
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

   
  if(authentication == null){
    InputStream awsCredInpStr = getClass().getClassLoader().getResourceAsStream(awsCredentialsProperties);
    if (awsCredInpStr == null)
      LOG.info("AWS Credentials File was not found on the classpath!");
      AWSCredentials credentials = new PropertiesCredentials(awsCredInpStr);
      setConf(credentials);
  }
  return (AWSCredentials)authentication;
  }
View Full Code Here

    try {

      final File file = new File(getCredentials());

      final AWSCredentials creds = new PropertiesCredentials(file);

      amazonClient = new AmazonSNSAsyncClient(creds, service);

      return true;
View Full Code Here

        AWSCredentials awsCredentials = null;
        InputStream credentialsFile = getClass().getClassLoader().getResourceAsStream("AwsCredentials.properties");
        if (credentialsFile != null) {
            logger.info("Loading credentials from AwsCredentials.properties");
            try {
                awsCredentials = new PropertiesCredentials(credentialsFile);
            } catch (IOException e) {
                throw new PersistenceException("Failed loading credentials from AwsCredentials.properties.", e);
            }
        } else {
            logger.info("Loading credentials from simplejpa.properties");
View Full Code Here

        dynamo.shutdown();
    }
   
    protected static AWSCredentials awsTestCredentials() {
        try {
            return new PropertiesCredentials(new File(
                    System.getProperty("user.home")
                            + "/.aws/awsTestAccount.properties"));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        dynamo.shutdown();
    }

    protected static AWSCredentials awsTestCredentials() {
        try {
            return new PropertiesCredentials(new File(
                    System.getProperty("user.home")
                            + "/.aws/awsTestAccount.properties"));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        AWSCredentials awsCredentials = null;
        InputStream credentialsFile = getClass().getClassLoader().getResourceAsStream("AwsCredentials.properties");
        if (credentialsFile != null) {
            logger.info("Loading credentials from AwsCredentials.properties");
            try {
                awsCredentials = new PropertiesCredentials(credentialsFile);
            } catch (IOException e) {
                throw new PersistenceException("Failed loading credentials from AwsCredentials.properties.", e);
            }
        } else {
            logger.info("Loading credentials from simplejpa.properties");
View Full Code Here

TOP

Related Classes of com.amazonaws.auth.PropertiesCredentials

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.