org.oddjob.jobs.job
Class RunJob
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.BasePrimary
org.oddjob.framework.SimpleJob
org.oddjob.jobs.job.RunJob
- All Implemented Interfaces:
- Runnable, ArooaContextAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful
public class RunJob
- extends SimpleJob
Description
A job which runs another job. The other job can be
local or or on a server.
This jobs completion state will reflect the success of the run
operation, not the state of the job being run.
Example
Examples elsewhere.
- The
JMXClientJob job has an
example that uses run to start a job on a
remote server.
- Author:
- Rob Gordon
| Methods inherited from class org.oddjob.framework.SimpleJob |
fireDestroyedState, force, getStateChanger, hardReset, onDestroy, onReset, onStop, run, sleep, softReset, stateHandler, stop |
| Methods inherited from class org.oddjob.framework.BaseComponent |
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession |
RunJob
public RunJob()
setJob
public void setJob(Runnable node)
- Set the stop node directly.
- Parameters:
node - The job.
getJob
public Runnable getJob()
- Get the job.
- Returns:
- The node.
execute
protected int execute()
throws Exception
- Description copied from class:
SimpleJob
- Execute this job.
- Specified by:
execute in class SimpleJob
- Returns:
- 0 if the job is complete, anything else otherwise.
- Throws:
Exception - If the unexpected occurs.