org.embl.ebi.escience.scuflworkers.rserv
Class RservTask

java.lang.Object
  extended by org.embl.ebi.escience.scuflworkers.rserv.RservTask
All Implemented Interfaces:
ProcessorTaskWorker

public class RservTask
extends java.lang.Object
implements ProcessorTaskWorker

A task to invoke a RProcessor. Connect to the Rserv by using JRclient, and execute R script. Converts inputs and outputs as appropriate

Author:
Stian Soiland

Constructor Summary
RservTask(Processor p)
           
 
Method Summary
 org.rosuda.JRclient.Rconnection connect()
           
 java.util.Map execute(java.util.Map workflowInputMap, IProcessorTask parentTask)
          Given a map of name->DataThing value, invoke the underlying task and return a map of result name -> DataThing value.
static org.rosuda.JRclient.REXP javaToRexp(java.lang.Object input, java.lang.Class javaType)
           
 java.lang.Object rexpToJava(org.rosuda.JRclient.REXP exp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RservTask

public RservTask(Processor p)
Method Detail

rexpToJava

public java.lang.Object rexpToJava(org.rosuda.JRclient.REXP exp)

javaToRexp

public static org.rosuda.JRclient.REXP javaToRexp(java.lang.Object input,
                                                  java.lang.Class javaType)

connect

public org.rosuda.JRclient.Rconnection connect()
                                        throws TaskExecutionException
Throws:
TaskExecutionException

execute

public java.util.Map execute(java.util.Map workflowInputMap,
                             IProcessorTask parentTask)
                      throws TaskExecutionException
Description copied from interface: ProcessorTaskWorker
Given a map of name->DataThing value, invoke the underlying task and return a map of result name -> DataThing value.

Specified by:
execute in interface ProcessorTaskWorker
Throws:
TaskExecutionException - thrown if an error occurs during task invocation