Package org.oddjob.jobs.job
Class StartJob
- All Implemented Interfaces:
Serializable,Runnable,ArooaContextAware,ArooaSessionAware,Forceable,PropertyChangeNotifier,Iconic,LogEnabled,Resettable,Stateful
- Author:
- Rob Gordon
- See Also:
Description
This job will run another job. It is intended for starting services or jobs on remote servers which is why it is named start. If it used on a local job it will block until the local job has run.
Unlike the RunJob, this job will not monitor or reflect the
state of the started job. To monitor the state of the started job the
job could be followed by a MirrorState.
The start job won't reset the job to be started. If the job to start
isn't started because it's in the wrong state this job will still
COMPLETE. This job can be preceded by a ResetJob if resetting
is required.
Example
Starting a service. A folder contains a choice of services. The service id to use is provided at runtime with a property such as -DpriceService=nonCachingPriceService. The selected service is started and used by the Pricing Job.
<oddjob>
<job>
<sequential>
<jobs>
<folder name="services">
<jobs>
<bean id="cachingPriceService" class="org.oddjob.examples.CachingPriceService"/>
<bean id="nonCachingPriceService" class="org.oddjob.examples.NonCachingPriceService"/>
</jobs>
</folder>
<start job="${${priceService}}"/>
<bean id="pricingJob" class="org.oddjob.examples.PricingJob" priceService="${${priceService}}"/>
</jobs>
</sequential>
</job>
</oddjob>
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.oddjob.framework.extend.SimpleJob
fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onReset, onStop, run, sleep, softReset, stateHandler, stopMethods 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
-
StartJob
public StartJob()
-
-
Method Details
-
setJob
Set the stop node directly.- Parameters:
node- The job.
-
getJob
Get the job.- Returns:
- The node.
-
execute
Description copied from class:SimpleJobExecute this job.
-