|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperatorControllable
@ALDAOperator public class ALDOperatorControllable
Operator class with inherent event handling for execution control.
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.
Nested Class Summary | |
---|---|
static class |
ALDOperatorControllable.OperatorControlStatus
Control command and/or operator status, respectively. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
ALDOperator.HidingMode |
Field Summary | |
---|---|
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.OperatorControlStatus |
operatorStatus
Status of operator, used to stop/pause/resume calculations. |
protected int |
stepSize
Step size in step-wise execution mode. |
protected boolean |
stepWiseExecution
Flag for step-wise execution. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ALDOperatorControllable()
Default constructor. |
Method Summary | |
---|---|
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. |
void |
handleALDConfigurationEvent(ALDConfigurationEvent event)
Method which is called on event occurence. |
void |
handleALDControlEvent(ALDControlEvent event)
Method which is called on event occurence. |
protected void |
operate()
This method does the actual work and needs to be implemented by every subclass. |
void |
removeALDConfigurationEventListener(ALDConfigurationEventListener listener)
Removes a listener from this reporter. |
void |
removeALDControlEventListener(ALDControlEventListener listener)
Removes a listener from this reporter. |
void |
setNotifyRecursiveFlag(boolean flag)
Specify if events are to be passed forward to nested listeners or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean stepWiseExecution
protected int stepSize
protected boolean notifyListenersRecursively
protected volatile EventListenerList controlEventlistenerList
protected volatile EventListenerList configurationEventlistenerList
protected volatile ALDOperatorControllable.OperatorControlStatus operatorStatus
Constructor Detail |
---|
public ALDOperatorControllable() throws ALDOperatorException
ALDOperatorException
Method Detail |
---|
public void setNotifyRecursiveFlag(boolean flag)
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.protected void operate() throws ALDOperatorException, ALDProcessingDAGException
ALDOperator
operate
in class ALDOperator
ALDOperatorException
ALDProcessingDAGException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |