org.oddjob.jobs.structural
Class ParallelJob

java.lang.Object
  extended by org.oddjob.framework.BaseComponent
      extended by org.oddjob.framework.BasePrimary
          extended by org.oddjob.framework.StructuralJob<Runnable>
              extended by org.oddjob.framework.SimultaneousStructural
                  extended by org.oddjob.jobs.structural.ParallelJob
All Implemented Interfaces:
Serializable, Runnable, ArooaContextAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful, Stoppable, Structural

public class ParallelJob
extends SimultaneousStructural

Description

A job which executes it's child jobs in parallel.

The return state for this job depends on the return states of all the children - Complete if all the children complete, exception if there are any exceptions in the children, or not complete if any of the children fail to complete.

Example

Two jobs running in parallel.
<oddjob>
    <job>
        <parallel>
            <jobs>
                <echo>This runs in parallel</echo>
                <echo>With this which could be displayed first!</echo>
            </jobs>
        </parallel>
    </job>
</oddjob>
See Also:
Serialized Form
Author:
Rob Gordon

Field Summary
 
Fields inherited from class org.oddjob.framework.StructuralJob
childHelper, childStateReflector, stateHandler, stop, structuralState
 
Fields inherited from class org.oddjob.framework.BaseComponent
iconHelper
 
Constructor Summary
ParallelJob()
           
 
Method Summary
protected  StateOperator getStateOp()
           
 
Methods inherited from class org.oddjob.framework.SimultaneousStructural
execute, onStop, setExecutorService, setJobs, startChildStateReflector
 
Methods inherited from class org.oddjob.framework.StructuralJob
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, onDestroy, onReset, removeStructuralListener, run, softReset, stateHandler, stop
 
Methods inherited from class org.oddjob.framework.BasePrimary
configure, getName, logger, logger, loggerName, save, setName, toString
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.oddjob.Stoppable
stop
 
Methods inherited from interface org.oddjob.Stateful
addStateListener, lastStateEvent, removeStateListener
 

Constructor Detail

ParallelJob

public ParallelJob()
Method Detail

getStateOp

protected StateOperator getStateOp()
Specified by:
getStateOp in class StructuralJob<Runnable>