public class JoinJob extends StructuralJob<Runnable>
<oddjob>
<job>
<sequential>
<jobs>
<folder>
<jobs>
<state:flag id="apples" xmlns:state="http://rgordon.co.uk/oddjob/state"/>
<state:flag id="oranges" xmlns:state="http://rgordon.co.uk/oddjob/state"/>
</jobs>
</folder>
<state:join id="our-join" xmlns:state="http://rgordon.co.uk/oddjob/state">
<job>
<sequential>
<jobs>
<scheduling:trigger newOnly="true" on="${apples}" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling">
<job>
<echo>Apples</echo>
</job>
</scheduling:trigger>
<scheduling:trigger newOnly="true" on="${oranges}" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling">
<job>
<echo>Oranges</echo>
</job>
</scheduling:trigger>
</jobs>
</sequential>
</job>
</state:join>
<echo id="last-job">And that's that!</echo>
</jobs>
</sequential>
</job>
</oddjob>
childHelper, childStateReflector, destroy, stop, structuralState| Constructor and Description |
|---|
JoinJob() |
| 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. |
long |
getTimeout() |
void |
setJob(Runnable child)
Set the child job.
|
void |
setTimeout(long timeout) |
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onHardReset, onReset, onSoftReset, onStop, removeStructuralListener, run, softReset, startChildStateReflector, stateHandler, stopconfigure, getName, logger, logger, loggerName, save, setName, toStringaddIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddStateListener, lastStateEvent, removeStateListenerpublic void setJob(Runnable child)
Property: job
Description: The child job.
Required: No, but pointless if missing.
child - A childprotected void execute()
throws InterruptedException
StructuralJobexecute in class StructuralJob<Runnable>InterruptedExceptionprotected StateOperator getInitialStateOp()
StructuralJobStateOperator that will decide
how to evaluate the children's state.getInitialStateOp in class StructuralJob<Runnable>public long getTimeout()
public void setTimeout(long timeout)