public abstract class AbstractServiceTask extends AbstractRunnableTask
Task.ConnectionStatusexeclistenersDEFAULT_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| Constructor and Description |
|---|
AbstractServiceTask(boolean multival,
Tool tool,
TaskFactory factory,
boolean preserveinst)
Constructs an abstract service task for the specified tool.
|
AbstractServiceTask(Tool tool,
TaskFactory factory,
boolean preserveinst)
Constructs an abstract service task for the specified tool.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finished()
Tell the data monitor that this thread monitor has completed outputting the data i.e.
|
protected abstract void |
flush()
This method flushes the currently invoking services.
|
int |
getMaxConcurrentInvocations() |
void |
init()
Initialises the web service runnable task
|
protected abstract java.lang.Object[] |
invoke(java.lang.Object[] input,
ClipInBucket bucket)
This method invokes the service with the specified input data.
|
protected abstract boolean |
isInputEssential() |
boolean |
isMultiValuedOutput() |
protected void |
postSend()
Method called after data is sent, should be over-ridden with post send fucntionality.
|
protected void |
preReceive()
Method called before data is received, should be over-ridden with pre receive fucntionality
|
void |
reset()
Order a runnable instance to stop and reset it to its pre-run state
|
protected void |
setMaxConcurrentInvocations(int maxconcurrent)
Sets the maximum concurrent invocations for this service
|
void |
wakeUp()
Tells a runnable instance (e.g.
|
void |
wakeUp(Node node)
Tells the runnable instance (e.g.
|
addExecutionListener, dispose, 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, isDataInputNode, isDataOutputNode, isParameterInputNode, isParameterOutputNode, isParameterTriggerNode, isRunContinuously, notifyNodeAdded, notifyNodeRemoved, notifyParameterSet, 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, waitaddExtension, 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 AbstractServiceTask(boolean multival,
Tool tool,
TaskFactory factory,
boolean preserveinst)
throws TaskException
multival - true if return multi-valued resultsTaskExceptionpublic AbstractServiceTask(Tool tool, TaskFactory factory, boolean preserveinst) throws TaskException
TaskExceptionpublic void init()
protected abstract boolean isInputEssential()
protected abstract java.lang.Object[] invoke(java.lang.Object[] input,
ClipInBucket bucket)
throws java.lang.Exception
input - an array of the input data (indexed by node)bucket - clip-ins for this invokejava.lang.Exceptionprotected void preReceive()
protected void postSend()
protected abstract void flush()
public int getMaxConcurrentInvocations()
protected void setMaxConcurrentInvocations(int maxconcurrent)
public boolean isMultiValuedOutput()
public void wakeUp(Node node)
wakeUp in interface RunnableInstancewakeUp in class AbstractRunnableTaskpublic void wakeUp()
wakeUp in interface RunnableInstancewakeUp in class AbstractRunnableTaskpublic void finished()
finished in interface RunnableInstancefinished in class AbstractRunnableTaskpublic void reset()
reset in interface RunnableInstancereset in class AbstractRunnableTask