Class ObservableLifecycleStatusMachine<SRC>

java.lang.Object
org.refcodes.component.LifecycleMachine
org.refcodes.component.ext.observer.ObservableLifecycleStatusMachine<SRC>
Type Parameters:
SRC - The source of the events consumed by the LifecycleStatusObserver.
All Implemented Interfaces:
Destroyable, Destroyable.DestroyAutomaton, Initializable, Initializable.InitializeAutomaton, InitializedAccessor, LifecycleComponent, LifecycleComponent.LifecycleAutomaton, LifecycleStatusAccessor, Pausable, Pausable.PauseAutomaton, Resumable, Resumable.ResumeAutomaton, RunningAccessor, Startable, Startable.StartAutomaton, Stoppable, Stoppable.StopAutomaton, Observable<LifecycleStatusObserver<InitializeAccomplishedEvent<SRC>, StartAccomplishedEvent<SRC>, ResumeAccomplishedEvent<SRC>, PauseAccomplishedEvent<SRC>, StopAccomplishedEvent<SRC>, DestroyAccomplishedEvent<SRC>, EventMetaData, SRC>>

The ObservableLifecycleStatusMachine extends the LifecycleMachine with life-cycle ActionEvent functionality which can be vetoed, such running through several stages from getting started till being destroyed. The valid state changes are mainly as follows:

"start" - "pause" - "resume" - "stop" - "destroy"

For example:

"start" - "pause" - "resume" - "pause" - "resume" - "stop" - "start" - "pause" - "resume" - "stop" - "destroy"

The implementation is suffixed with "Machine" instead of "Automaton" for differentiation with any interface of similar (same) name.