T
- The type of the event or trigger.public abstract class EventJobBase<T> extends StructuralJob<java.lang.Object>
childHelper, destroy, stop, structuralState
Constructor and Description |
---|
EventJobBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
execute()
Execute this job.
|
protected StateOperator |
getInitialStateOp()
Subclasses must provide the
StateOperator that will decide
how to evaluate the children's state. |
EventOf<T> |
getTrigger() |
protected void |
onStop()
Allow sub classes to do something on stop.
|
protected void |
postStop()
Subclasses can override to perform actions once children have stopped.
|
void |
setExecutorService(java.util.concurrent.ExecutorService executorService) |
void |
setJobs(int index,
java.lang.Object child)
Add a child job.
|
protected void |
setTrigger(EventOf<T> trigger) |
protected void |
startChildStateReflector()
Start the child state reflector.
|
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onHardReset, onReset, onSoftReset, removeStructuralListener, run, softReset, stateHandler, stop, stopChildStateReflector
configure, getName, logger, logger, loggerName, save, setName, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStateListener, lastStateEvent, removeStateListener
@Inject public void setExecutorService(java.util.concurrent.ExecutorService executorService)
protected StateOperator getInitialStateOp()
StructuralJob
StateOperator
that will decide
how to evaluate the children's state.getInitialStateOp
in class StructuralJob<java.lang.Object>
protected void startChildStateReflector()
StructuralJob
startChildStateReflector
in class StructuralJob<java.lang.Object>
protected void execute() throws java.lang.Throwable
StructuralJob
execute
in class StructuralJob<java.lang.Object>
java.lang.Exception
- If the unexpected occurs.java.lang.Throwable
protected void onStop()
StructuralJob
onStop
in class StructuralJob<java.lang.Object>
protected void postStop() throws FailedToStopException
StructuralJob
postStop
in class StructuralJob<java.lang.Object>
FailedToStopException
public void setJobs(int index, java.lang.Object child)
Property: jobs
Description: The child jobs.
Required: No, but pointless if missing.
child
- A child