public abstract class ALDOperatorControllable extends ALDOperator implements ALDControlEventListener, ALDControlEventReporter, ALDConfigurationEventListener, ALDConfigurationEventReporter
This operator acts as listener for `Alida` control events. On receiving events the operator changes its control status which may be used to control operator execution, and in particular to interrupt calculations in a controlled fashion, i.e. to keep results already obtained.
Modifier and Type | Class and Description |
---|---|
static class |
ALDOperatorControllable.OperatorControlStatus
Commands for controlling the operator.
|
class |
ALDOperatorControllable.OperatorControlStatusHandle
Wrapper class for control status information.
|
static class |
ALDOperatorControllable.OperatorExecutionStatus
Actual operator status.
|
ALDOperator.HidingMode, ALDOperator.HistoryConstructionMode
Modifier and Type | Field and Description |
---|---|
protected EventListenerList |
configurationEventlistenerList
List of configuration event listeners attached to this reporter.
|
protected EventListenerList |
controlEventlistenerList
List of control event listeners attached to this reporter.
|
protected boolean |
notifyListenersRecursively
Flag for recursive propagation of events to nested listeners.
|
protected ALDOperatorControllable.OperatorExecutionStatus |
operatorExecStatus
Actual execution state of operator.
|
private ALDOperatorControllable.OperatorControlStatus |
operatorStatus
Control status of operator, used to stop/pause/resume calculations.
|
private ALDOperatorControllable.OperatorControlStatusHandle |
operatorStatusHandle
Wrapper object for operator control status.
|
protected int |
stepSize
Step size in step-wise execution mode.
|
protected boolean |
stepWiseExecution
Flag for step-wise execution.
|
completeDAG, genuineInstance, name, operatorExecutionEventlistenerList, opNodeStackHash, portHashAccess, verbose, versionProvider
Constructor and Description |
---|
ALDOperatorControllable()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addALDConfigurationEventListener(ALDConfigurationEventListener listener)
Adds a listener to this reporter.
|
void |
addALDControlEventListener(ALDControlEventListener listener)
Adds a listener to this reporter.
|
void |
fireALDConfigurationEvent(ALDConfigurationEvent event)
Sends an event to all registered listeners.
|
void |
fireALDControlEvent(ALDControlEvent event)
Sends the given event to all registered listeners.
|
ALDOperatorControllable.OperatorControlStatus |
getControlStatus()
Get operator control status.
|
ALDOperatorControllable.OperatorControlStatusHandle |
getControlStatusHandle()
Get wrapper object for control status.
|
ALDOperatorControllable.OperatorExecutionStatus |
getExecutionStatus()
Get the current execution status of the operator.
|
void |
handleALDConfigurationEvent(ALDConfigurationEvent event)
Method which is called on event occurence.
|
void |
handleALDControlEvent(ALDControlEvent event)
Method which is called on event occurence.
|
void |
removeALDConfigurationEventListener(ALDConfigurationEventListener listener)
Removes a listener from this reporter.
|
void |
removeALDControlEventListener(ALDControlEventListener listener)
Removes a listener from this reporter.
|
void |
setControlStatus(ALDOperatorControllable.OperatorControlStatus s)
Set operator control status.
|
void |
setNotifyRecursiveFlag(boolean flag)
Specify if events are to be passed forward to nested listeners or not.
|
abstract boolean |
supportsStepWiseExecution()
Function for indicating if step-wise execution is supported.
|
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, allowedClassForIO, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, operate, print, print, print, printInterface, printInterface, readHistory, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
protected boolean stepWiseExecution
protected int stepSize
protected boolean notifyListenersRecursively
protected volatile EventListenerList controlEventlistenerList
protected volatile EventListenerList configurationEventlistenerList
private volatile ALDOperatorControllable.OperatorControlStatus operatorStatus
private volatile ALDOperatorControllable.OperatorControlStatusHandle operatorStatusHandle
protected volatile ALDOperatorControllable.OperatorExecutionStatus operatorExecStatus
public ALDOperatorControllable() throws ALDOperatorException
ALDOperatorException
public void setNotifyRecursiveFlag(boolean flag)
public ALDOperatorControllable.OperatorControlStatus getControlStatus()
public void setControlStatus(ALDOperatorControllable.OperatorControlStatus s)
s
- New operator control status.public ALDOperatorControllable.OperatorControlStatusHandle getControlStatusHandle()
public ALDOperatorControllable.OperatorExecutionStatus getExecutionStatus()
public abstract boolean supportsStepWiseExecution()
public void handleALDControlEvent(ALDControlEvent event)
ALDControlEventListener
handleALDControlEvent
in interface ALDControlEventListener
event
- Event to be handled.public void addALDControlEventListener(ALDControlEventListener listener)
ALDControlEventReporter
addALDControlEventListener
in interface ALDControlEventReporter
listener
- Listener to be added.public void removeALDControlEventListener(ALDControlEventListener listener)
ALDControlEventReporter
removeALDControlEventListener
in interface ALDControlEventReporter
listener
- Listener to be removed.public void fireALDControlEvent(ALDControlEvent event)
ALDControlEventReporter
fireALDControlEvent
in interface ALDControlEventReporter
event
- Event to be send to all listeners.public void addALDConfigurationEventListener(ALDConfigurationEventListener listener)
ALDConfigurationEventReporter
addALDConfigurationEventListener
in interface ALDConfigurationEventReporter
listener
- Listener to be added.public void removeALDConfigurationEventListener(ALDConfigurationEventListener listener)
ALDConfigurationEventReporter
removeALDConfigurationEventListener
in interface ALDConfigurationEventReporter
listener
- Listener to be removed.public void fireALDConfigurationEvent(ALDConfigurationEvent event)
ALDConfigurationEventReporter
fireALDConfigurationEvent
in interface ALDConfigurationEventReporter
event
- Event to be send to all listeners.public void handleALDConfigurationEvent(ALDConfigurationEvent event)
ALDConfigurationEventListener
handleALDConfigurationEvent
in interface ALDConfigurationEventListener
event
- Event to be handled.Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.