public class RepeatJob extends StructuralJob<Runnable> implements Stoppable
Without either a until or a times the job will loop indefinitely.
<oddjob> <job> <repeat times="3" id="repeat"> <job> <echo>Hello ${repeat.count}</echo> </job> </repeat> </job> </oddjob>
childHelper, childStateReflector, destroy, stop, structuralState
Constructor and Description |
---|
RepeatJob() |
Modifier and Type | Method and Description |
---|---|
protected void |
execute()
Execute this job.
|
int |
getCount() |
Object |
getCurrent() |
int |
getIndex() |
protected StateOperator |
getInitialStateOp()
Subclasses must provide the
StateOperator that will decide
how to evaluate the children's state. |
int |
getTimes() |
Iterable<?> |
getValues() |
boolean |
isUntil() |
protected void |
onReset()
Allow sub classes to do something on reset.
|
void |
setJob(Runnable child) |
void |
setTimes(int times) |
void |
setUntil(boolean until) |
void |
setValues(Iterable<?> values) |
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onStop, removeStructuralListener, run, softReset, startChildStateReflector, stateHandler, stop
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
protected StateOperator getInitialStateOp()
StructuralJob
StateOperator
that will decide
how to evaluate the children's state.getInitialStateOp
in class StructuralJob<Runnable>
public void setJob(Runnable child)
Property: job
Description: The job who's execution to schedule.
Required: Yes.
protected void execute()
StructuralJob
execute
in class StructuralJob<Runnable>
protected void onReset()
StructuralJob
onReset
in class StructuralJob<Runnable>
public void setValues(Iterable<?> values)
public Iterable<?> getValues()
public boolean isUntil()
public void setUntil(boolean until)
public int getTimes()
public void setTimes(int times)
public int getCount()
public int getIndex()
Property: index
Description: The same as count. Provided so configurations
can be swapped between this and ForEachJob
job.
public Object getCurrent()