Package net.sf.pipet.api.ModuleInterface

Examples of net.sf.pipet.api.ModuleInterface.ModuleInstance


    SimulationModuleData data = new SimulationModuleData(atts, input, output, messenger);

    ModuleInterface modif = ModuleLoader.loadModuleInterface(mod_uri, cfg);
    ModuleDefinition mod = ModuleDefinition.create(cfg.getRootModule(), mod_uri, modif, null, null);
   
    ModuleInstance instance = mod.getInterface().createInstance(data, messenger);
    data.close(instance.run());

    Assert.assertEquals(String.format("Exit status of %s.", mod.getInterfaceSpecification()), status, data.getStatus());
    if (test_content)
      data.testModuleOutput();
View Full Code Here


   
    try
    {
      Messenger modlogger = new PrefixMessenger(mod.getTitle()+": ", reporter);
      ServletModuleData data = new ServletModuleData(mod, cfg.getResourceLoader(), request, modlogger);
      ModuleInstance instance = mod.getCachePolicy().createCachedModuleJob(mod, data, modlogger);
      boolean result = instance.run();
      data.close(result);
     
      if (!result)
      {
        Xhtml.sendInternalServerError(response, reporter);
View Full Code Here

    return runModule(mod, atts, in, out, DEFAULT_RESOURCE_LOADER, msgr);
  }

  public static boolean runModule(ModuleDefinition mod, Map<String,String> atts, Map<String,Collection<InputStream>> in, Map<String,OutputStream> out, ResourceLoader loader, Messenger msgr) throws Exception
  {
    ModuleInstance job = mod.getInterface().createInstance(new PlainModuleData(createAttributes(atts), in, out, loader), msgr);
    return job.run();
  }
View Full Code Here

  @Deprecated
  public AbortablePipeline createJob(int interface_type, Messenger reporter)
    throws IOException
  {
    validate(reporter);
    ModuleInstance job = new PipelineJob(this, new DefaultResourceLoader(), interface_type, null, reporter);
    return new AbortablePipeline(job);
  }
View Full Code Here

 
  public AbortablePipeline createJob(ResourceLoader res, int interface_type, Messenger reporter)
    throws IOException
  {
    validate(reporter);
    ModuleInstance job = new PipelineJob(this, res, interface_type, null, reporter);
    return new AbortablePipeline(job);
  }
View Full Code Here

    return s.isEmpty() ? "none" : StringUtils.join(s, "; ");
  }
 
  private static int doJob() throws PipetError
  {
    ModuleInstance job = command.getJob();
    if (job == null)
      return 0;
   
    return job.run() ? 0 : -1;
  }
View Full Code Here

TOP

Related Classes of net.sf.pipet.api.ModuleInterface.ModuleInstance

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.