Class LifecycleMachine.ManualLifecycleMachine
java.lang.Object
org.refcodes.component.LifecycleMachine
org.refcodes.component.LifecycleMachine.ManualLifecycleMachine
- All Implemented Interfaces:
Destroyable, Destroyable.DestroyAutomaton, Initializable, Initializable.InitializeAutomaton, InitializedAccessor, LifecycleComponent, LifecycleComponent.LifecycleAutomaton, LifecycleStatusAccessor, LifecycleStatusAccessor.LifecycleStatusMutator, Pausable, Pausable.PauseAutomaton, Resumable, Resumable.ResumeAutomaton, RunningAccessor, Startable, Startable.StartAutomaton, Stoppable, Stoppable.StopAutomaton
- Enclosing class:
LifecycleMachine
public static class LifecycleMachine.ManualLifecycleMachine
extends LifecycleMachine
implements LifecycleStatusAccessor.LifecycleStatusMutator
Opens the otherwise protected
setLifecycleStatus(LifecycleStatus) to be public in order to
force any lifecycle status to be set.-
Nested Class Summary
Nested classes/interfaces inherited from class LifecycleMachine
LifecycleMachine.ManualLifecycleMachineNested classes/interfaces inherited from interface Destroyable
Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface Initializable
Initializable.InitializeAutomaton, Initializable.InitializeBuilder<B>, Initializable.UncheckedInitializableNested classes/interfaces inherited from interface InitializedAccessor
InitializedAccessor.InitializedMutator, InitializedAccessor.InitializedPropertyNested classes/interfaces inherited from interface LifecycleComponent
LifecycleComponent.LifecycleAutomaton, LifecycleComponent.UncheckedLifecycleComponentNested classes/interfaces inherited from interface LifecycleStatusAccessor
LifecycleStatusAccessor.LifecycleStatusBuilder<B>, LifecycleStatusAccessor.LifecycleStatusMutator, LifecycleStatusAccessor.LifecycleStatusPropertyNested classes/interfaces inherited from interface Pausable
Pausable.PauseAutomaton, Pausable.PauseBuilder<B>, Pausable.UncheckedPausableNested classes/interfaces inherited from interface Resumable
Resumable.ResumeAutomaton, Resumable.ResumeBuilder<B>, Resumable.UncheckedResumableNested classes/interfaces inherited from interface RunningAccessor
RunningAccessor.RunningMutator, RunningAccessor.RunningPropertyNested classes/interfaces inherited from interface Startable
Startable.StartAutomaton, Startable.StartBuilder<B>, Startable.UncheckedStartableNested classes/interfaces inherited from interface Stoppable
Stoppable.StopAutomaton, Stoppable.StopBuilder<B>, Stoppable.UncheckedStoppable -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor, suchLifecycleMachine.ManualLifecycleMachinecannot do much more than decline the variousLifecycleStatusstates for you.ManualLifecycleMachine(LifecycleComponent aLifecycleComponent) Instantiates the classLifecycleMachine.ManualLifecycleMachine. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetLifecycleStatus(LifecycleStatus aStatus) Method to force anyLifecycleStatusto be set with no rules being applied.Methods inherited from class LifecycleMachine
destroy, getLifecycleComponent, getLifecycleStatus, initialize, isDestroyable, isDestroyed, isInitalizable, isInitialized, isPausable, isPaused, isResumable, isRunning, isStartable, isStoppable, isStopped, pause, resume, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Initializable
initializeUncheckedMethods inherited from interface Pausable
pauseUncheckedMethods inherited from interface Resumable
resumeUncheckedMethods inherited from interface Startable
startUncheckedMethods inherited from interface Stoppable
stopUnchecked
-
Constructor Details
-
ManualLifecycleMachine
public ManualLifecycleMachine()Empty constructor, suchLifecycleMachine.ManualLifecycleMachinecannot do much more than decline the variousLifecycleStatusstates for you. -
ManualLifecycleMachine
Instantiates the classLifecycleMachine.ManualLifecycleMachine.- See Also:
-
-
Method Details
-
setLifecycleStatus
Method to force anyLifecycleStatusto be set with no rules being applied. Provides means to set theLifecycleStatusmanually.- Specified by:
setLifecycleStatusin interfaceLifecycleStatusAccessor.LifecycleStatusMutator- Overrides:
setLifecycleStatusin classLifecycleMachine- Parameters:
aStatus- The status to be "forced".
-