public class ResetJob extends SimpleJob
A reset might also be needed before running a job elsewhere such as on a remote server.
As of version 1.4 of Oddjob, this job can now also be used to force
jobs that are Forceable
by specify 'force' as level.
This job is not Serializable and so won't be persisted itself.
See also the Resets
job.
Look at the explorer.xml file in Oddjob's home directory. This file is
loaded by the default oddjob.xml file when Oddjob first runs.
The explorer.xml configuration is run with a FilePersister
persister that persists the Explorers state when it
completes. When Oddjob is run again the Explorer will be
loaded with it's previous COMPLETE state and so won't run. The reset
is necessary to set it back to READY.
<oddjob> <job> <sequential> <jobs> <reset job="${echo}" level="force"/> <echo id="echo">You will never see this!</echo> </jobs> </sequential> </job> </oddjob>
Constructor and Description |
---|
ResetJob() |
Modifier and Type | Method and Description |
---|---|
protected int |
execute()
Execute this job.
|
Object |
getJob()
Get the node to stop.
|
ResetAction |
getLevel() |
void |
setJob(Object node)
Set the stop node directly.
|
void |
setLevel(ResetAction level) |
fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onReset, onStop, run, sleep, softReset, 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
public void setJob(Object node)
node
- The node to stop.public Object getJob()
protected int execute() throws Exception
SimpleJob
public ResetAction getLevel()
public void setLevel(ResetAction level)
level
- The level to set.