/* If there is a instance control component connects to this
* component send information in soap header */
for (Node n : wsNode.getControlInPort().getFromNodes()) {
if (n instanceof InstanceNode) {
AmazonSecurityContext amazonSecurityContext;
final String awsAccessKeyId = config.getAwsAccessKey();
final String awsSecretKey = config.getAwsSecretKey();
final String username = ((InstanceNode) n).getUsername();
if (((InstanceNode) n).isStartNewInstance()) {
final String amiId = ((InstanceNode) n).getIdAsValue();
final String instanceType = ((InstanceNode) n).getInstanceType();
amazonSecurityContext =
new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
} else {
final String instanceId = ((InstanceNode) n).getIdAsValue();
amazonSecurityContext =
new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
}
this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
}
}