uk.ac.soton.itinnovation.taverna.enactor.entities
Class PortTask

java.lang.Object
  extended by uk.ac.soton.itinnovation.freefluo.core.task.AbstractTask
      extended by uk.ac.soton.itinnovation.taverna.enactor.entities.PortTask
All Implemented Interfaces:
uk.ac.soton.itinnovation.freefluo.core.event.RunEventSource, uk.ac.soton.itinnovation.freefluo.core.event.TaskStateListener, uk.ac.soton.itinnovation.freefluo.core.task.Task

public class PortTask
extends uk.ac.soton.itinnovation.freefluo.core.task.AbstractTask

GraphNode that represents a port on a Processor.


Field Summary
static int IN
           
static int OUT
           
 
Constructor Summary
PortTask(java.lang.String id, uk.ac.soton.itinnovation.freefluo.core.flow.Flow flow, Port port)
           
 
Method Summary
 boolean dataAvailable()
          Checks to see if data is available on this port
 void forceSetData(DataThing newDataThing)
           
 DataThing getData()
          Blocking method that waits for data to arrive and then supplies it
 Port getScuflPort()
          Obtains the original XScufl definition Port
 void handleRun(uk.ac.soton.itinnovation.freefluo.core.event.RunEvent runEvent)
          Transfer data from this port task into any child port tasks that are present, this is effectively pushing information from the output port to the input port; other processor implementations pull from the input port and push to the output port so this is the link inbetween two processors.
 void setData(DataThing newDataThing)
           
 void setData(DataThing newDataThing, boolean forced)
          Sets a reference to the actual data holder
 int type()
          Obtains the type of this Port, either input (0) or output (1).
 
Methods inherited from class uk.ac.soton.itinnovation.freefluo.core.task.AbstractTask
addBreakpoint, addChild, addParent, addTaskEventListener, addTaskStateListener, cancel, destroy, getChild, getChildren, getDescription, getEndTime, getErrorMessage, getExecutionTimeSoFar, getFlow, getName, getParent, getParents, getRunEvents, getStartTime, getState, getStateString, getTaskId, isBreakpoint, isCancelable, isCompleted, isCritical, isDataNonVolatile, isFailFlowOnTaskFailure, isPause, isPauseable, isStateFinal, linkTo, pause, removeBreakpoint, removeTaskEventListener, removeTaskStateListener, resume, run, setCompleted, setCritical, setErrorMessage, setFailFlowOnTaskFailure, taskStateChanged, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IN

public static int IN

OUT

public static int OUT
Constructor Detail

PortTask

public PortTask(java.lang.String id,
                uk.ac.soton.itinnovation.freefluo.core.flow.Flow flow,
                Port port)
Method Detail

type

public int type()
Obtains the type of this Port, either input (0) or output (1).

Returns:
type

getScuflPort

public Port getScuflPort()
Obtains the original XScufl definition Port

Returns:
XScufl definition port

dataAvailable

public boolean dataAvailable()
Checks to see if data is available on this port

Returns:
true if available

getData

public DataThing getData()
Blocking method that waits for data to arrive and then supplies it

Returns:
holder for data

forceSetData

public void forceSetData(DataThing newDataThing)

setData

public void setData(DataThing newDataThing)

setData

public void setData(DataThing newDataThing,
                    boolean forced)
Sets a reference to the actual data holder

Parameters:
newDataThing - holder for data

handleRun

public void handleRun(uk.ac.soton.itinnovation.freefluo.core.event.RunEvent runEvent)
Transfer data from this port task into any child port tasks that are present, this is effectively pushing information from the output port to the input port; other processor implementations pull from the input port and push to the output port so this is the link inbetween two processors.

Specified by:
handleRun in class uk.ac.soton.itinnovation.freefluo.core.task.AbstractTask