Package org.oddjob.jobs.structural
Class SwitchJob
- All Implemented Interfaces:
Serializable,Runnable,ArooaContextAware,ArooaSessionAware,Forceable,PropertyChangeNotifier,Iconic,LogEnabled,Resettable,Stateful,Stoppable,Structural
public class SwitchJob
extends StructuralJob<Object>
implements Runnable, Stateful, Resettable, Structural, Stoppable
- Author:
- Rob Gordon
- See Also:
Description
Switch Based on a predicate.-
Field Summary
Fields inherited from class org.oddjob.framework.extend.StructuralJob
childHelper, destroy, stop, structuralState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute()Execute this job.protected StateOperatorSubclasses must provide theStateOperatorthat will decide how to evaluate the children's state.getValue()voidvoidsetPredicates(Predicate<Object>[] predicates) voidsetSwitches(ArooaValue[] switches) voidMethods inherited from class org.oddjob.framework.extend.StructuralJob
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onHardReset, onReset, onSoftReset, onStop, postStop, removeStructuralListener, run, softReset, startChildStateReflector, stateHandler, stop, stopChildStateReflector, waitForChildrenOnStopMethods inherited from class org.oddjob.framework.extend.BasePrimary
configure, getName, logger, logger, loggerName, save, setName, toStringMethods inherited from class org.oddjob.framework.extend.BaseComponent
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSessionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.oddjob.Resettable
hardReset, softResetMethods inherited from interface org.oddjob.Stateful
addStateListener, lastStateEvent, removeStateListenerMethods inherited from interface org.oddjob.Structural
addStructuralListener, removeStructuralListener
-
Constructor Details
-
SwitchJob
public SwitchJob()
-
-
Method Details
-
setJobs
- Reference Property:
- jobs
- Required:
- At least one.
Description
The child jobs. -
getInitialStateOp
Description copied from class:StructuralJobSubclasses must provide theStateOperatorthat will decide how to evaluate the children's state.- Specified by:
getInitialStateOpin classStructuralJob<Object>- Returns:
- A State Operator. Must not be null.
-
execute
protected void execute()Description copied from class:StructuralJobExecute this job.- Specified by:
executein classStructuralJob<Object>
-
getValue
-
setValue
-
getPredicates
-
setPredicates
-
getSwitches
-
setSwitches
-