public class RunJob extends StructuralJob<Object> implements Structural, Stoppable, ConfigurationOwner
This job reflects the state of the job being executed.
TODO: Why does this job implement ConfigurationOwner
????
JMXClientJob
job has an
example that uses run
to run a job on a
remote server.childHelper, childStateReflector, destroy, stop, structuralState
Constructor and Description |
---|
RunJob() |
Modifier and Type | Method and Description |
---|---|
void |
addOwnerStateListener(OwnerStateListener listener)
Add a listener.
|
protected void |
execute()
Execute this job.
|
protected StateOperator |
getInitialStateOp()
Subclasses must provide the
StateOperator that will decide
how to evaluate the children's state. |
Object |
getJob()
Get the job.
|
boolean |
hardReset()
Perform a hard reset on the job.
|
ConfigurationSession |
provideConfigurationSession()
Provide a
ConfigurationSession . |
void |
removeOwnerStateListener(OwnerStateListener listener)
Remove a listener.
|
SerializableDesignFactory |
rootDesignFactory()
Get the design factory for the configuration.
|
ArooaElement |
rootElement()
Get the root element.
|
void |
setJob(Object node)
Set the stop node directly.
|
protected void |
sleep(long waitTime)
Sleep.
|
boolean |
softReset()
Perform a soft reset on the job.
|
addStructuralListener, fireDestroyedState, force, getStateChanger, iconHelper, isStop, onDestroy, onReset, onStop, removeStructuralListener, run, startChildStateReflector, 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
addStructuralListener, removeStructuralListener
addStateListener, lastStateEvent, removeStateListener
public void setJob(Object node)
node
- The job.public Object getJob()
protected StateOperator getInitialStateOp()
StructuralJob
StateOperator
that will decide
how to evaluate the children's state.getInitialStateOp
in class StructuralJob<Object>
protected void execute() throws Exception
StructuralJob
execute
in class StructuralJob<Object>
Exception
- If the unexpected occurs.protected void sleep(long waitTime)
SimpleJob.sleep(long)
.waitTime
- Time in milliseconds to sleep for.public boolean softReset()
softReset
in interface Resetable
softReset
in class StructuralJob<Object>
public boolean hardReset()
hardReset
in interface Resetable
hardReset
in class StructuralJob<Object>
public void addOwnerStateListener(OwnerStateListener listener)
ConfigurationOwner
addOwnerStateListener
in interface ConfigurationOwner
public void removeOwnerStateListener(OwnerStateListener listener)
ConfigurationOwner
removeOwnerStateListener
in interface ConfigurationOwner
public ConfigurationSession provideConfigurationSession()
ConfigurationOwner
ConfigurationSession
.provideConfigurationSession
in interface ConfigurationOwner
ConfigurationSession
. My be null if no session is available.public SerializableDesignFactory rootDesignFactory()
ConfigurationOwner
Note that this is a SerializableDesignFactory
so that
this interface can be represented remotely.
rootDesignFactory
in interface ConfigurationOwner
ConfigurationSession
is available.public ArooaElement rootElement()
ConfigurationOwner
rootElement
in interface ConfigurationOwner