org.oddjob
Interface Stateful

All Known Subinterfaces:
LoosingOutcome
All Known Implementing Classes:
AndState, AntJob, ArchiveBrowserJob, ArchiveJob, BaseComponent, BasePrimary, BaseWrapper, CascadeJob, ChooseFile, ClientBase, ConfirmationJob, DependsJob, EqualsState, ExecJob, FlagState, ForEachJob, GrabJob, IfJob, InputJob, InvokeJob, JMXClientJob, JMXServiceJob, JobStateHandler, JoinJob, MegaBeanBus, MirrorState, MultiExplorerLauncher, Oddjob, Oddjob.OddjobRoot, OddjobExplorer, OddjobPanel, OrState, ParallelJob, ParentStateHandler, PropertiesJob, PropertiesJobBase, RepeatJob, ResetJob, Resets, Retry, RMIRegistryJob, RunJob, RunnableWrapper, ScheduleBase, ScriptJob, SequentialJob, SerializableJob, ServicesJob, ServiceStateHandler, ServiceWrapper, SetJob, SimpleJob, SimpleService, SimultaneousStructural, StartJob, StateHandler, StateReflector, StopJob, StructuralJob, StructuralStateHelper, Timer, TimerBase, Trigger, VariablesJob, WaitJob

public interface Stateful

A Stateful job implements this interface so that it's state can be discovered. State is used to control the flow of execution within Oddjob, as well as being a way of informing client applications of progress.

Author:
Rob Gordon

Method Summary
 void addStateListener(StateListener listener)
          Add a job state listener.
 StateEvent lastStateEvent()
          Get the last state event.
 void removeStateListener(StateListener listener)
          Remove a job state listener.
 

Method Detail

addStateListener

void addStateListener(StateListener listener)
                      throws JobDestroyedException
Add a job state listener.

Parameters:
listener - The listener.
Throws:
JobDestroyedException

removeStateListener

void removeStateListener(StateListener listener)
Remove a job state listener.

Parameters:
listener - The listener.

lastStateEvent

StateEvent lastStateEvent()
Get the last state event.

Returns:
The last State Event