Package org.ogce.gfac.context.impl

Examples of org.ogce.gfac.context.impl.AmazonSecurityContext


  @Override
  public void initialize(InvocationContext invocationContext) throws GfacException {
    ExecutionContext appExecContext = invocationContext.getExecutionContext();
    ExecutionModel model = appExecContext.getExecutionModel();
   
    AmazonSecurityContext amazonSecurityContext = ((AmazonSecurityContext) invocationContext.getSecurityContext(AMAZON_SECURITY_CONTEXT));
    String access_key = amazonSecurityContext.getAccessKey();
    String secret_key = amazonSecurityContext.getSecretKey();

    //TODO way to read value (header or xregistry)
    String ami_id = "";
    String ins_type = "";
    String ins_id = "";
View Full Code Here


        OMElement amazon = x.getFirstChildWithName(new QName(null, AMAZON));

        if (amazon != null) {

          AmazonSecurityContext amazonSecurityContext = new AmazonSecurityContext();

          OMElement accessKey = amazon.getFirstChildWithName(new QName(null, ACCESS_KEY_ID));
          OMElement secretKey = amazon.getFirstChildWithName(new QName(null, SECRET_ACCESS_KEY));

          amazonSecurityContext.setAccessKey(accessKey.getText());
          amazonSecurityContext.setSecretKey(secretKey.getText());

          // set to context
          MessageContextUtil.addContextToProperty(msgContext, GfacService.SECURITY_CONTEXT, "amazon",amazonSecurityContext);
        }
      }
View Full Code Here

TOP

Related Classes of org.ogce.gfac.context.impl.AmazonSecurityContext

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.