Module org.refcodes.component
Package org.refcodes.component
Class LifecycleAutomatonImpl.ManualLifecycleAutomatonImpl
java.lang.Object
org.refcodes.component.LifecycleAutomatonImpl
org.refcodes.component.LifecycleAutomatonImpl.ManualLifecycleAutomatonImpl
- 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:
- LifecycleAutomatonImpl
public static class LifecycleAutomatonImpl.ManualLifecycleAutomatonImpl
extends LifecycleAutomatonImpl
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.LifecycleAutomatonImpl
LifecycleAutomatonImpl.ManualLifecycleAutomatonImplNested 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, suchLifecycleAutomatonImpl.ManualLifecycleAutomatonImplcannot do much more than decline the variousLifecycleStatusstates for you.ManualLifecycleAutomatonImpl(LifecycleComponent aLifecycleComponent) This constructor uses aLifecycleAutomatonImpl.ManualLifecycleAutomatonImplfor wrapping it inside theLifecycleAutomatonImpl, 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.LifecycleAutomatonImpl
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
-
ManualLifecycleAutomatonImpl
public ManualLifecycleAutomatonImpl()Empty constructor, suchLifecycleAutomatonImpl.ManualLifecycleAutomatonImplcannot do much more than decline the variousLifecycleStatusstates for you. -
ManualLifecycleAutomatonImpl
This constructor uses aLifecycleAutomatonImpl.ManualLifecycleAutomatonImplfor wrapping it inside theLifecycleAutomatonImpl, 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 classLifecycleAutomatonImpl- Parameters:
aStatus- The status to be "forced".
-