Package org.apache.airavata.gfac.context

Examples of org.apache.airavata.gfac.context.ApplicationContext


    @Test
    public void testSerialJSDL() throws Exception {

        JobTypeType jobType = JobTypeType.Factory.newInstance();
        jobType.set(JobTypeType.SERIAL);
        ApplicationContext appContext = getApplicationContext();
        appContext.setApplicationDeploymentDescription(getApplicationDesc(jobType));
        jobExecutionContext.setApplicationContext(appContext);

        JobDefinitionDocument jobDefDoc = JSDLGenerator.buildJSDLInstance(jobExecutionContext);

        assertTrue(jobDefDoc.getJobDefinition().getJobDescription().getApplication().toString().contains("/bin/cat"));
View Full Code Here


    @Test
    public void testMPIJSDL() throws Exception {

        JobTypeType jobType = JobTypeType.Factory.newInstance();
        jobType.set(JobTypeType.MPI);
        ApplicationContext appContext = getApplicationContext();
        appContext.setApplicationDeploymentDescription(getApplicationDesc(jobType));
        jobExecutionContext.setApplicationContext(appContext);

        JobDefinitionDocument jobDefDoc = JSDLGenerator.buildJSDLInstance(jobExecutionContext);

        assertTrue(jobDefDoc.getJobDefinition().getJobDescription().getApplication().toString().contains("/bin/cat"));
View Full Code Here

        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
        return gFacConfiguration;
    }

    protected ApplicationContext getApplicationContext() {
        ApplicationContext applicationContext = new ApplicationContext();
        applicationContext.setHostDescription(getHostDesc());

        applicationContext.setServiceDescription(getServiceDesc());
        return applicationContext;
    }
View Full Code Here

    return GFacConfiguration.create(new File(resource.getPath()), null,
        null);
  }

  protected ApplicationContext getApplicationContext() {
    ApplicationContext applicationContext = new ApplicationContext();
    applicationContext.setHostDescription(getHostDesc());
    return applicationContext;
  }
View Full Code Here

        serv.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
        serv.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));

        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, context);
        ApplicationContext applicationContext = new ApplicationContext();
        applicationContext.setHostDescription(host);
        applicationContext.setApplicationDeploymentDescription(appDesc);
        jobExecutionContext.setApplicationContext(applicationContext);
        applicationContext.setServiceDescription(serv);

        MessageContext inMessage = new MessageContext();

        ActualParameter echo_input = new ActualParameter();
        ((StringParameterType) echo_input.getType()).setValue("ai");
View Full Code Here

        serv.getType().setOutputParametersArray(outputParamList);

        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
        // Adding security context
        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext());
        ApplicationContext applicationContext = new ApplicationContext();
        jobExecutionContext.setApplicationContext(applicationContext);
        applicationContext.setServiceDescription(serv);
        applicationContext.setApplicationDeploymentDescription(appDesc);
        applicationContext.setHostDescription(host);

        MessageContext inMessage = new MessageContext();
        ActualParameter echo_input = new ActualParameter();
        ((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
        inMessage.addParameter("echo_input", echo_input);
View Full Code Here

    return GFacConfiguration.create(new File(resource.getPath()), null,
        null);
  }

  protected ApplicationContext getApplicationContext() {
    ApplicationContext applicationContext = new ApplicationContext();
    applicationContext.setHostDescription(getHostDesc());
    return applicationContext;
  }
View Full Code Here

    @Test
    public void testSerialJSDL() throws Exception {

        JobTypeType jobType = JobTypeType.Factory.newInstance();
        jobType.set(JobTypeType.SERIAL);
        ApplicationContext appContext = getApplicationContext();
        appContext.setApplicationDeploymentDescription(getApplicationDesc(jobType));
        jobExecutionContext.setApplicationContext(appContext);

        JobDefinitionDocument jobDefDoc = JSDLGenerator.buildJSDLInstance(jobExecutionContext);

        assertTrue(jobDefDoc.getJobDefinition().getJobDescription().getApplication().toString().contains("/bin/cat"));
View Full Code Here

    @Test
    public void testMPIJSDL() throws Exception {

        JobTypeType jobType = JobTypeType.Factory.newInstance();
        jobType.set(JobTypeType.MPI);
        ApplicationContext appContext = getApplicationContext();
        appContext.setApplicationDeploymentDescription(getApplicationDesc(jobType));
        jobExecutionContext.setApplicationContext(appContext);

        JobDefinitionDocument jobDefDoc = JSDLGenerator.buildJSDLInstance(jobExecutionContext);

        assertTrue(jobDefDoc.getJobDefinition().getJobDescription().getApplication().toString().contains("/bin/cat"));
View Full Code Here

        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
        return gFacConfiguration;
    }

    protected ApplicationContext getApplicationContext() {
        ApplicationContext applicationContext = new ApplicationContext();
        applicationContext.setHostDescription(getHostDesc());

        applicationContext.setServiceDescription(getServiceDesc());
        return applicationContext;
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.gfac.context.ApplicationContext

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.