Package org.apache.airavata.gfac.core.context

Examples of org.apache.airavata.gfac.core.context.MessageContext


        log.info("Invoking GridFTPInputHandler ...");
        super.invoke(jobExecutionContext);
        DataTransferDetails detail = new DataTransferDetails();
        TransferStatus status = new TransferStatus();
      
        MessageContext inputNew = new MessageContext();
        try {
            MessageContext input = jobExecutionContext.getInMessageContext();
            Set<String> parameters = input.getParameters().keySet();
            for (String paramName : parameters) {
                ActualParameter actualParameter = (ActualParameter) input.getParameters().get(paramName);
                String paramValue = MappingFactory.toString(actualParameter);
                //TODO: Review this with type
                if ("URI".equals(actualParameter.getType().getType().toString())) {
                    ((URIParameterType) actualParameter.getType()).setValue(stageInputFiles(jobExecutionContext, paramValue));
                } else if ("URIArray".equals(actualParameter.getType().getType().toString())) {
View Full Code Here


           else {
             //TODO
           }


        MessageContext outputNew = new MessageContext();
        MessageContext output = jobExecutionContext.getOutMessageContext();
        Map<String, Object> parameters = output.getParameters();
        for (String paramName : parameters.keySet()) {
            ActualParameter actualParameter = (ActualParameter) parameters
                    .get(paramName);

            GridFtp ftp = new GridFtp();
View Full Code Here

        applicationContext.setHostDescription(hostDescription);
        applicationContext.setServiceDescription(serviceDescription);
        jobExecutionContext.setApplicationContext(applicationContext);

        List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getMessageContext(experimentInputs,
                serviceDescription.getType().getInputParametersArray())));

        List<DataObjectType> outputData = taskData.getApplicationOutputs();
        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getMessageContext(outputData,
                serviceDescription.getType().getOutputParametersArray())));

        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);

        return jobExecutionContext;
View Full Code Here

public class ProviderUtils {

    public static List<String> getInputParameters(JobExecutionContext jobExecutionContext) throws GFacProviderException {
        List<String> parameters = new ArrayList<String>();
        MessageContext inMessageContext = jobExecutionContext.getInMessageContext();
        InputParameterType[] inputParamDefinitionArray = jobExecutionContext.getApplicationContext().
                getServiceDescription().getType().getInputParametersArray();
        for (InputParameterType inputParam : inputParamDefinitionArray) {
            String parameterName = inputParam.getParameterName();
            ActualParameter parameter = (ActualParameter)inMessageContext.getParameter(parameterName);
            if(parameter == null){
                throw new GFacProviderException("Cannot find required input parameter " + parameterName + ".");
            }

            parameters.add(MappingFactory.toString(parameter));
View Full Code Here

TOP

Related Classes of org.apache.airavata.gfac.core.context.MessageContext

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.