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:
org.refcodes.component.Destroyable, org.refcodes.component.Destroyable.DestroyAutomaton, org.refcodes.component.Initializable, org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.InitializedAccessor, org.refcodes.component.LifecycleComponent, org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleStatusAccessor, org.refcodes.component.Pausable, org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Resumable, org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.RunningAccessor, org.refcodes.component.Startable, org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Stoppable, org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.observer.Observable<LifecycleStatusObserver<InitializeAccomplishedEvent<SRC>,StartAccomplishedEvent<SRC>,ResumeAccomplishedEvent<SRC>,PauseAccomplishedEvent<SRC>,StopAccomplishedEvent<SRC>,DestroyAccomplishedEvent<SRC>,org.refcodes.observer.EventMetaData,SRC>>

public class ObservableLifecycleStatusMachine<SRC> extends org.refcodes.component.LifecycleMachine implements org.refcodes.observer.Observable<LifecycleStatusObserver<InitializeAccomplishedEvent<SRC>,StartAccomplishedEvent<SRC>,ResumeAccomplishedEvent<SRC>,PauseAccomplishedEvent<SRC>,StopAccomplishedEvent<SRC>,DestroyAccomplishedEvent<SRC>,org.refcodes.observer.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.