public class RunnableTask extends AbstractRunnableTask implements RunnableInstance, RunnableInterface, ControlInterface, java.lang.Runnable
Task.ConnectionStatus| Modifier and Type | Field and Description |
|---|---|
int |
packetsLeft
The count for the number of data packets still not output
|
execlistenersDEFAULT_NODE_REQUIREMENT, DEPRECATED_GUI_XPOS, DEPRECATED_GUI_YPOS, ERROR_MESSAGE, ESSENTIAL, ESSENTIAL_IF_CONNECTED, EXECUTION_COUNT, EXECUTION_REQUEST_COUNT, EXECUTION_STATE, GUI_X, GUI_Y, NODE_PROPERTIES, NODE_REQUIREMENT, OPTIONAL, OUTPUT_TYPEANY_DATA_TYPE, CLONE_ALL_OUTPUT, CLONE_MULTIPLE_OUTPUT, COPY_OUTPUT, DEFAULT_IN_NODES, DEFAULT_INPUT_NODES, DEFAULT_MAX_NODES, DEFAULT_MIN_NODES, DEFAULT_OUT_NODES, DEFAULT_OUTPUT_NODES, DEFAULT_POP_UP_DESCRIPTION, DEFINITION_JAVA_CLASS, DEFINITION_METADATA, DEFINITION_TRIANA_XML, DEFINITION_UNKNOWN, GUI, GUI_BUILDER, HELP_FILE_PARAM, IMMEDIATE_UPDATE, INTERNAL, LATE_INITIALIZE, MAX_INPUT_NODES, MAX_OUTPUT_NODES, MIN_INPUT_NODES, MIN_OUTPUT_NODES, NO_UPDATE, OLD_GUI_BUILDER, ON_TASK_INSTANTIATION, ON_USER_ACCESS, OUTPUT_POLICY, PANEL_INSTANCE, PARAM_PANEL_CLASS, PARAM_PANEL_HIDE, PARAM_PANEL_INSTANTIATE, PARAM_PANEL_SHOW, PARAM_UPDATE_POLICY, POP_UP_DESCRIPTION, PROCESS_UPDATE, TOOL_VERSION, TRANSIENT, TRANSIENT_ACCESSIBLE, UNKNOWN_DATA_TYPE, UNKNOWN_TYPE, USER_ACCESSIBLE| Modifier | Constructor and Description |
|---|---|
protected |
RunnableTask(Tool task,
TaskFactory factory,
boolean preserveinst) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterProcess() |
void |
beforeProcess()
This function is called immediately before the unit's process() function is called
|
void |
dispose()
disposes of the running unit
|
ClipInStore |
extractClipInState() |
void |
finished()
Tells the Unit that an output node has finished sending the data.
|
java.lang.Object |
getClipIn(java.lang.Object data,
java.lang.String name) |
java.lang.Object |
getClipIn(java.lang.String name) |
ControlInterface |
getControlInterface() |
java.lang.Object |
getInput(int nodeNumber)
Returns the data at input node nodeNumber.
|
protected java.lang.Object |
getInput(RunnableNodeInterface node)
Returns the data at the specified input node.
|
Task |
getTask() |
ToolTable |
getToolTable() |
void |
initUnit()
Initializes the unit associated with this runnable task.
|
boolean |
isClipInName(java.lang.String name) |
boolean |
isInput(int nodeNumber) |
boolean |
isOutputSent(int outputNode) |
protected void |
notifyParameterSet(java.lang.String name,
java.lang.String type,
java.lang.Object oldval,
java.lang.Object newval)
Notifies all the task listeners that a parameter has been set.
|
void |
output(int outputNode,
java.lang.Object data,
boolean blocking)
Outputs the data to the given node outputNode.
|
void |
output(java.lang.Object data)
b Outputs the data from the unit.
|
void |
process()
Tries running the process() method.
|
void |
putClipIn(java.lang.String name,
java.lang.Object clipin)
Put the specified clip-in into this task's clip-in bucket
|
void |
queueClipIn(java.lang.String name,
java.lang.Object clipin)
Queue the specified clip-in to be inserted into the clip-in bucket when the task is next run
|
java.lang.Object |
removeClipIn(java.lang.String name)
Remove the clip-in with the specified name from this task.
|
void |
reset()
Order a unit to stop, resets the unit to its pre-run state
|
void |
restoreClipInState(ClipInStore store)
Restores a previously stored clip-in bucket state
|
void |
run()
This over-rides the RunnableUnit's run method so that we can display the data flow indicators on the icons when
we are processing data.
|
void |
runGroup()
Runs all the tasks within the group that this task belongs to.
|
void |
runTask(Task task)
Runs the specified task.
|
void |
startThread()
creates the thread to run the unit, or set a flag to re-run the existing thread
|
void |
wakeUp()
Tells a task to wake-up if data has been received on all of its essential nodes.
|
void |
wakeUp(Node node)
Tells the Task to wake up if data has been received on all of its essential nodes.
|
addExecutionListener, executionFinished, executionRequested, executionReset, executionStarting, getExecutionState, notifyError, pause, removeExecutionListener, resume, setParent, waitPauseaddDataInputNode, addDataOutputNode, addDeclaredNodeProperty, addParameterInputNode, addParameterOutputNode, addTaskListener, getAbsoluteNodeIndex, getContext, getContextProperty, getDataInputNode, getDataInputNodeCount, getDataInputNodes, getDataOutputNode, getDataOutputNodeCount, getDataOutputNodes, getDeclaredNodeProperties, getDefaultNodeRequirement, getErrorMessage, getExecutionCount, getExecutionRequestCount, getInputNode, getInputNodes, getInstanceID, getNodeIndex, getNodeRequirement, getOutputNode, getOutputNodes, getParameterInputName, getParameterInputNode, getParameterInputNodeCount, getParameterInputNodes, getParameterOutputName, getParameterOutputNode, getParameterOutputNodeCount, getParameterOutputNodes, getParent, getQualifiedTaskName, getUltimateParent, init, isDataInputNode, isDataOutputNode, isParameterInputNode, isParameterOutputNode, isParameterTriggerNode, isRunContinuously, notifyNodeAdded, notifyNodeRemoved, notifyPropertyUpdate, notifyTaskDisposed, removeDataInputNode, removeDataOutputNode, removeNode, removeParameter, removeParameterInputNode, removeParameterOutputNode, removeProxy, removeTaskListener, setContextProperty, setDataInputNodeCount, setDataOutputNodeCount, setDeclaredNodeProperties, setDefaultNodeRequirement, setNodeRequirement, setParameter, setParameterInputs, setParameterOutputNames, setProxy, setRunContinuously, setSubTitle, setToolName, updateProxyaddExtension, addRenderingHint, getDataInputTypes, getDataInputTypes, getDataOutputTypes, getDataOutputTypes, getDefaultDataInputNodes, getDefaultDataOutputNodes, getDefinitionPath, getDefinitionType, getDisplayName, getDisplayPackage, getExtension, getExtensionNames, getHelpFile, getInputNodeCount, getMaxDataInputNodes, getMaxDataOutputNodes, getMinDataInputNodes, getMinDataOutputNodes, getOutputNodeCount, getParameter, getParameterNames, getParameterType, getPopUpDescription, getProperties, getProxy, getQualifiedToolName, getRenderingHint, getRenderingHints, getSubTitle, getToolBox, getToolName, getToolPackage, getUnitName, getUnitPackage, getVersion, isExtensionName, isParameterName, isRenderingHint, removeExtension, removeRenderingHint, setDataInputTypes, setDataInputTypes, setDataOutputTypes, setDataOutputTypes, setDefaultDataInputNodes, setDefaultDataOutputNodes, setDefinitionPath, setDefinitionType, setDisplayName, setDisplayPackage, setHelpFile, setMaxDataInputNodes, setMaxDataOutputNodes, setMinDataInputNodes, setMinDataOutputNodes, setParameterOutputs, setParameterType, setPopUpDescription, setProperties, setToolBox, setToolPackage, setVersion, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExecutionListener, getExecutionState, pause, removeExecutionListener, resumenotifyErroraddExtension, addRenderingHint, getDataInputTypes, getDataInputTypes, getDataOutputTypes, getDataOutputTypes, getDefaultDataInputNodes, getDefaultDataOutputNodes, getDefinitionPath, getDefinitionType, getDisplayName, getDisplayPackage, getExtension, getExtensionNames, getHelpFile, getInputNodeCount, getMaxDataInputNodes, getMaxDataOutputNodes, getMinDataInputNodes, getMinDataOutputNodes, getOutputNodeCount, getParameter, getParameterNames, getParameterType, getPopUpDescription, getProperties, getProxy, getQualifiedToolName, getRenderingHint, getRenderingHints, getSubTitle, getToolBox, getToolName, getToolPackage, getVersion, isExtensionName, isParameterName, isRenderingHint, removeExtension, removeRenderingHint, setDataInputTypes, setDataOutputTypes, setDefinitionPath, setDefinitionType, setHelpFile, setParameterOutputs, setParameterType, setPopUpDescription, setProperties, setToolBox, setToolPackage, setVersionpublic int packetsLeft
protected RunnableTask(Tool task, TaskFactory factory, boolean preserveinst) throws TaskException
TaskExceptionpublic void initUnit()
throws TaskException
TaskExceptionpublic Task getTask()
getTask in interface RunnableInterfacepublic ControlInterface getControlInterface()
getControlInterface in interface RunnableInterfacepublic ToolTable getToolTable()
getToolTable in interface RunnableInterfacepublic java.lang.Object getClipIn(java.lang.String name)
getClipIn in interface ClipableTaskInterfacepublic java.lang.Object getClipIn(java.lang.Object data,
java.lang.String name)
getClipIn in interface ClipableTaskInterfacepublic boolean isClipInName(java.lang.String name)
isClipInName in interface ClipableTaskInterfacepublic void putClipIn(java.lang.String name,
java.lang.Object clipin)
putClipIn in interface ClipableTaskInterfacepublic void queueClipIn(java.lang.String name,
java.lang.Object clipin)
queueClipIn in interface ClipableTaskInterfacepublic java.lang.Object removeClipIn(java.lang.String name)
removeClipIn in interface ClipableTaskInterfacepublic ClipInStore extractClipInState()
extractClipInState in interface ClipableTaskInterfacepublic void restoreClipInState(ClipInStore store)
restoreClipInState in interface ClipableTaskInterfacepublic final void finished()
finished in interface RunnableInstancefinished in class AbstractRunnableTaskpublic final void wakeUp()
wakeUp in interface RunnableInstancewakeUp in class AbstractRunnableTaskpublic final void wakeUp(Node node)
wakeUp in interface RunnableInstancewakeUp in class AbstractRunnableTaskpublic final void startThread()
public boolean isInput(int nodeNumber)
isInput in interface RunnableInterfacepublic java.lang.Object getInput(int nodeNumber)
throws OutOfRangeException,
EmptyingException,
NotCompatibleException
getInput in interface RunnableInterfacenodeNumber - the node you want to get the data from.OutOfRangeExceptionEmptyingExceptionNotCompatibleExceptionprotected java.lang.Object getInput(RunnableNodeInterface node)
public void output(java.lang.Object data)
output in interface RunnableInterfacedata - the data to be sentpublic void output(int outputNode,
java.lang.Object data,
boolean blocking)
output in interface RunnableInterfaceoutputNode - the output node you wish to setdata - the data to be sentpublic boolean isOutputSent(int outputNode)
isOutputSent in interface RunnableInterfacepublic void run()
run in interface java.lang.Runnablepublic void reset()
reset in interface RunnableInstancereset in class AbstractRunnableTaskpublic void runTask(Task task) throws SchedulerException
runTask in interface ControlInterfaceSchedulerExceptionpublic void runGroup()
throws SchedulerException
runGroup in interface ControlInterfaceSchedulerExceptionpublic void process()
public void beforeProcess()
public void afterProcess()
protected void notifyParameterSet(java.lang.String name,
java.lang.String type,
java.lang.Object oldval,
java.lang.Object newval)
TaskImpnotifyParameterSet in class TaskImppublic void dispose()
dispose in interface Taskdispose in class AbstractRunnableTask