Module org.refcodes.component
Package org.refcodes.component
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 org.refcodes.component.LifecycleMachine
LifecycleMachine.ManualLifecycleMachineNested classes/interfaces inherited from interface org.refcodes.component.Destroyable
Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface org.refcodes.component.Initializable
Initializable.InitializeAutomaton, Initializable.InitializeBuilder<B extends Initializable.InitializeBuilder<B>>, Initializable.UncheckedInitializableNested classes/interfaces inherited from interface org.refcodes.component.InitializedAccessor
InitializedAccessor.InitializedMutator, InitializedAccessor.InitializedPropertyNested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
LifecycleComponent.LifecycleAutomaton, LifecycleComponent.UncheckedLifecycleComponentNested classes/interfaces inherited from interface org.refcodes.component.LifecycleStatusAccessor
LifecycleStatusAccessor.LifecycleStatusBuilder<B extends LifecycleStatusAccessor.LifecycleStatusBuilder<B>>, LifecycleStatusAccessor.LifecycleStatusMutator, LifecycleStatusAccessor.LifecycleStatusPropertyNested classes/interfaces inherited from interface org.refcodes.component.Pausable
Pausable.PauseAutomaton, Pausable.PauseBuilder<B extends Pausable.PauseBuilder<B>>, Pausable.UncheckedPausableNested classes/interfaces inherited from interface org.refcodes.component.Resumable
Resumable.ResumeAutomaton, Resumable.ResumeBuilder<B extends Resumable.ResumeBuilder<B>>, Resumable.UncheckedResumableNested classes/interfaces inherited from interface org.refcodes.component.RunningAccessor
RunningAccessor.RunningMutator, RunningAccessor.RunningPropertyNested classes/interfaces inherited from interface org.refcodes.component.Startable
Startable.StartAutomaton, Startable.StartBuilder<B extends Startable.StartBuilder<B>>, Startable.UncheckedStartableNested classes/interfaces inherited from interface org.refcodes.component.Stoppable
Stoppable.StopAutomaton, Stoppable.StopBuilder<B extends Stoppable.StopBuilder<B>>, Stoppable.UncheckedStoppable -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor, suchLifecycleMachine.ManualLifecycleMachinecannot do much more than decline the variousLifecycleStatusstates for you.ManualLifecycleMachine(LifecycleComponent aLifecycleComponent) This constructor uses aLifecycleMachine.ManualLifecycleMachinefor wrapping it inside theLifecycleComponent.LifecycleAutomaton, making sure of obeying and guarding the correctLifecycleStatus's order ofLifecycleStatusstates for you. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetLifecycleStatus(LifecycleStatus aStatus) Method to force anyLifecycleStatusto be set with no rules being applied.Methods inherited from class org.refcodes.component.LifecycleMachine
destroy, getLifecycleComponent, getLifecycleStatus, initialize, isDestroyable, isDestroyed, isInitalizable, isInitialized, isPausable, isPaused, isResumable, isRunning, isStartable, isStoppable, isStopped, pause, resume, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.component.Initializable
initializeUncheckedMethods inherited from interface org.refcodes.component.Pausable
pauseUncheckedMethods inherited from interface org.refcodes.component.Resumable
resumeUncheckedMethods inherited from interface org.refcodes.component.Startable
startUncheckedMethods inherited from interface org.refcodes.component.Stoppable
stopUnchecked
-
Constructor Details
-
ManualLifecycleMachine
public ManualLifecycleMachine()Empty constructor, suchLifecycleMachine.ManualLifecycleMachinecannot do much more than decline the variousLifecycleStatusstates for you. -
ManualLifecycleMachine
This constructor uses aLifecycleMachine.ManualLifecycleMachinefor wrapping it inside theLifecycleComponent.LifecycleAutomaton, making sure of obeying and guarding the correctLifecycleStatus's order ofLifecycleStatusstates for you.- Parameters:
aLifecycleComponent- The component to be guarded regarding the correct declination of theLifecycleStatusstates.
-
-
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".
-