org.oddjob.state
Class StructuralStateHelper

java.lang.Object
  extended by org.oddjob.state.StructuralStateHelper
All Implemented Interfaces:
Stateful

public class StructuralStateHelper
extends Object
implements Stateful

Track, and aggregate the states of child jobs. Aggregation is achieved using the given StateOperator.

Author:
rob

Constructor Summary
StructuralStateHelper(Structural structural, StateOperator operator)
          Constructor.
 
Method Summary
 void addStateListener(StateListener listener)
          Add a job state listener.
 State[] getChildStates()
           
 StateEvent lastStateEvent()
          Get the last job state event.
 void removeStateListener(StateListener listener)
          Remove a job state listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructuralStateHelper

public StructuralStateHelper(Structural structural,
                             StateOperator operator)
Constructor.

Parameters:
structural -
operator -
Method Detail

addStateListener

public void addStateListener(StateListener listener)
Description copied from interface: Stateful
Add a job state listener.

Specified by:
addStateListener in interface Stateful
Parameters:
listener - The listener.

removeStateListener

public void removeStateListener(StateListener listener)
Description copied from interface: Stateful
Remove a job state listener.

Specified by:
removeStateListener in interface Stateful
Parameters:
listener - The listener.

lastStateEvent

public StateEvent lastStateEvent()
Description copied from interface: Stateful
Get the last job state event.

Specified by:
lastStateEvent in interface Stateful
Returns:

getChildStates

public State[] getChildStates()