public abstract class AbstractProcessingTask extends SwingWorker<Object,Object> implements IProcessingTask
SwingWorker.StateValue| Modifier and Type | Field and Description |
|---|---|
protected AbstractProcessingTask |
childTask
A reference to the child task, if present.
|
protected long |
duration
A variable for recording the actual running time.
|
protected boolean |
headless
A flag whether or not the processing task is launched without GUI.
|
protected IOperator |
operator
The cached
IOperator of this task. |
protected IOperatorGUI |
operatorGUI
The
IOperatorGUI of the operator in this task. |
protected AbstractProcessingTask |
parentTask
A reference to the parent task, if present.
|
protected long |
startTime
The start time will be set, when the processing starts.
|
protected boolean |
virtual
A flag whether or not the processing task uses temporary hard disk
storage for large data formats.
|
protected IWorkPackage |
workPackage
The cached
IWorkPackage. |
| Constructor and Description |
|---|
AbstractProcessingTask()
Empty default constructor.
|
AbstractProcessingTask(IWorkPackage workPackage)
Create a new task from a given
IWorkPackage. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
doInBackground()
This method must be implemented by all subclasses.
|
protected void |
done()
This method is called after the
doInBackground() method and
must be implemented by all subclasses. |
AbstractProcessingTask |
getChildTask() |
IOperator |
getOperator() |
IOperatorGUI |
getOperatorGUI() |
AbstractProcessingTask |
getParentTask() |
IWorkPackage |
getWorkPackage() |
boolean |
isHeadless() |
boolean |
isVirtual()
Returns whether or not the virtual flag has been set at the execution
start of a task.
|
protected void |
process(List<Object> chunks)
This method is called by the EventDispatcherThread, when
publish() is called within the doInBackground()
method. |
void |
setChildTask(AbstractProcessingTask childTask) |
void |
setHeadless(boolean headless) |
void |
setOperator(IOperator operator) |
void |
setOperatorGUI(IOperatorGUI operatorGUI) |
void |
setParentTask(AbstractProcessingTask parentTask) |
void |
setVirtual(boolean virtual) |
void |
setWorkPackage(IWorkPackage workPackage) |
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgressprotected boolean virtual
protected boolean headless
protected long startTime
protected long duration
protected IWorkPackage workPackage
IWorkPackage.protected IOperator operator
protected IOperatorGUI operatorGUI
IOperatorGUI of the operator in this task.protected AbstractProcessingTask parentTask
protected AbstractProcessingTask childTask
public AbstractProcessingTask()
public AbstractProcessingTask(IWorkPackage workPackage)
IWorkPackage.workPackage - protected abstract Object doInBackground() throws Exception
doInBackground in class SwingWorker<Object,Object>get().Exceptionprotected void process(List<Object> chunks)
publish() is called within the doInBackground()
method.process in class SwingWorker<Object,Object>chunks - - the objects to processprotected void done()
doInBackground() method and
must be implemented by all subclasses. It is called too, when the
SwingWorker is cancelled.done in class SwingWorker<Object,Object>public IWorkPackage getWorkPackage()
public void setWorkPackage(IWorkPackage workPackage)
workPackage - the workPackage to setpublic IOperator getOperator()
public void setOperator(IOperator operator)
operator - the operator to setpublic IOperatorGUI getOperatorGUI()
public void setOperatorGUI(IOperatorGUI operatorGUI)
public boolean isVirtual()
IProcessingTaskisVirtual in interface IProcessingTasktrue if every item is serialized to the hard disk
and loaded again on demand, false if the entire
processing is performed within the memory.public void setVirtual(boolean virtual)
public boolean isHeadless()
public void setHeadless(boolean headless)
public AbstractProcessingTask getParentTask()
getParentTask in interface IProcessingTaskpublic void setParentTask(AbstractProcessingTask parentTask)
setParentTask in interface IProcessingTaskpublic AbstractProcessingTask getChildTask()
public void setChildTask(AbstractProcessingTask childTask)
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.