public class StopJob extends SerializableJob implements Stoppable
Normally The stop job will not complete until the job it is stopping is in a not executing state. Therefore if the stop job is attempting to stop a parent job of itself the stop job could block indefinitely. This case is detected and the job enters an Exception state.
JMXClientJob has an example where the stop
job is used to stop a client once the connection is no
longer needed.| Constructor and Description |
|---|
StopJob() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
execute()
Execute this job.
|
Stoppable |
getJob()
Get the node to stop.
|
protected void |
onStop()
Allow sub classes to do something on stop.
|
void |
setJob(Stoppable node)
Set the stop node directly.
|
fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onReset, run, sleep, softReset, stateHandler, stopconfigure, getName, logger, logger, loggerName, save, setName, toStringaddIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddStateListener, lastStateEvent, removeStateListenerpublic void setJob(Stoppable node)
node - The node to stop.public Stoppable getJob()
protected int execute()
throws Exception
SimpleJobprotected void onStop()
throws FailedToStopException
SimpleJobonStop in class SimpleJobFailedToStopException