Package org.oddjob.state
Class Resets
- All Implemented Interfaces:
Serializable,Runnable,ArooaContextAware,ArooaSessionAware,Forceable,PropertyChangeNotifier,Iconic,LogEnabled,Resettable,Stateful,Stoppable,Structural
- Author:
- Rob Gordon
- See Also:
- See the
EqualsStateexample. The resets are required because retry only sends a soft reset on retry and it must be hardened to reset theExistsJob.
Description
Captures Reset actions propagating down a job tree and either hardens soft resets to hard resets or softens hard resets to soft resets before passing them on to the child job.Execute and Stop actions are cascaded as normal to the child job.
See also the ResetJob job.
Example
Examples elsewhere.-
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.booleanPerform a hard reset on the job.booleanisHarden()booleanisSoften()voidsetHarden(boolean harden) voidvoidsetSoften(boolean soften) booleanPerform a soft reset on the job.Methods inherited from class org.oddjob.framework.extend.StructuralJob
addStructuralListener, fireDestroyedState, force, getStateChanger, iconHelper, isStop, onDestroy, onHardReset, onReset, onSoftReset, onStop, postStop, removeStructuralListener, run, 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.Stateful
addStateListener, lastStateEvent, removeStateListener
-
Constructor Details
-
Resets
public Resets()
-
-
Method Details
-
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
Description copied from class:StructuralJobExecute this job.- Specified by:
executein classStructuralJob<Object>- Throws:
Throwable
-
isHarden
public boolean isHarden() -
setHarden
public void setHarden(boolean harden) -
isSoften
public boolean isSoften() -
setSoften
public void setSoften(boolean soften) -
setJob
- Reference Property:
- job
- Required:
- Yes.
Description
The job to pass resets on to. -
hardReset
public boolean hardReset()Description copied from class:StructuralJobPerform a hard reset on the job.- Specified by:
hardResetin interfaceResettable- Overrides:
hardResetin classStructuralJob<Object>- Returns:
- true if successful.
-
softReset
public boolean softReset()Description copied from class:StructuralJobPerform a soft reset on the job.- Specified by:
softResetin interfaceResettable- Overrides:
softResetin classStructuralJob<Object>- Returns:
- true if successful.
-