Class ObservableLifecycleStatusAutomatonImpl
java.lang.Object
org.refcodes.component.LifecycleAutomatonImpl
org.refcodes.component.ext.observer.ObservableLifecycleStatusAutomatonImpl
- All Implemented Interfaces:
org.refcodes.component.Destroyable,org.refcodes.component.Destroyable.DestroyAutomaton,ObservableLifecycleStatusAutomaton,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.mixin.Loggable,org.refcodes.observer.Observable<LifecycleStatusObserver>
public class ObservableLifecycleStatusAutomatonImpl
extends org.refcodes.component.LifecycleAutomatonImpl
implements ObservableLifecycleStatusAutomaton, org.refcodes.mixin.Loggable
Abstract implementation of the
ObservableLifecycleStatusAutomaton
interface with the according hook methods for you to create your domain
driven ObservableLifecycleStatusAutomaton.-
Nested Class Summary
Nested classes/interfaces inherited from class org.refcodes.component.LifecycleAutomatonImpl
org.refcodes.component.LifecycleAutomatonImpl.ManualLifecycleAutomatonImplNested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface org.refcodes.component.Initializable
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializableNested classes/interfaces inherited from interface org.refcodes.component.InitializedAccessor
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedPropertyNested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponentNested classes/interfaces inherited from interface org.refcodes.component.LifecycleStatusAccessor
org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusBuilder<B extends org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusBuilder<B>>, org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusMutator, org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusPropertyNested classes/interfaces inherited from interface org.refcodes.component.Pausable
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausableNested classes/interfaces inherited from interface org.refcodes.component.Resumable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumableNested classes/interfaces inherited from interface org.refcodes.component.RunningAccessor
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningPropertyNested classes/interfaces inherited from interface org.refcodes.component.Startable
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartableNested classes/interfaces inherited from interface org.refcodes.component.Stoppable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable -
Field Summary
Fields inherited from interface org.refcodes.mixin.Loggable
RUNTIME_LOGGER_CLASS, RUNTIME_LOGGER_FACTORY_CLASS, RUNTIME_LOGGER_FACTORY_METHOD -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new observable life cycle automaton impl.ObservableLifecycleStatusAutomatonImpl(Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData) ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource) ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()booleanhasObserverSubscription(LifecycleStatusObserver aObserver) voidvoidpause()voidresume()voidstart()voidstop()booleansubscribeObserver(LifecycleStatusObserver aObserver) booleanunsubscribeObserver(LifecycleStatusObserver aObserver) Methods inherited from class org.refcodes.component.LifecycleAutomatonImpl
getLifecycleComponent, getLifecycleStatus, isDestroyable, isDestroyed, isInitalizable, isInitialized, isPausable, isPaused, isResumable, isRunning, isStartable, isStoppable, isStopped, setLifecycleStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.component.Destroyable.DestroyAutomaton
isDestroyable, isDestroyedMethods inherited from interface org.refcodes.component.Initializable
initializeUncheckedMethods inherited from interface org.refcodes.component.Initializable.InitializeAutomaton
isInitalizableMethods inherited from interface org.refcodes.component.InitializedAccessor
isInitializedMethods inherited from interface org.refcodes.component.LifecycleStatusAccessor
getLifecycleStatusMethods inherited from interface org.refcodes.mixin.Loggable
alert, alert, critical, critical, debug, error, info, notice, panic, trace, warn, warnMethods inherited from interface org.refcodes.component.Pausable
pauseUncheckedMethods inherited from interface org.refcodes.component.Pausable.PauseAutomaton
isPausable, isPausedMethods inherited from interface org.refcodes.component.Resumable
resumeUncheckedMethods inherited from interface org.refcodes.component.Resumable.ResumeAutomaton
isResumableMethods inherited from interface org.refcodes.component.RunningAccessor
isRunningMethods inherited from interface org.refcodes.component.Startable
startUncheckedMethods inherited from interface org.refcodes.component.Startable.StartAutomaton
isStartableMethods inherited from interface org.refcodes.component.Stoppable
stopUncheckedMethods inherited from interface org.refcodes.component.Stoppable.StopAutomaton
isStoppable, isStopped
-
Constructor Details
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl()Instantiates a new observable life cycle automaton impl. -
ObservableLifecycleStatusAutomatonImpl
- Parameters:
aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData) - Parameters:
aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource) - Parameters:
aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
ObservableLifecycleStatusAutomatonImpl
public ObservableLifecycleStatusAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) - Parameters:
aLifecycleComponent- TheLifecycleComponentto which the life-cycle method calls are to be delegated to.aEventMetaData- TheEventMetaDatato be used when firing events in case theEventMetaDatais to be different from the auto-generatedEventMetaData.aSource- The source instance to be used when firing events in case the source is to be different from this class' instance.aExecutorService- The executor service to be used when firingGenericActionEventinstances in multiple threads (if null then a default one is used).aExecutionStrategy- TheExecutionStrategyto be used when firingGenericActionEventinstance (if null then the defaultExecutionStrategy.SEQUENTIALis used).
-
-
Method Details
-
hasObserverSubscription
- Specified by:
hasObserverSubscriptionin interfaceorg.refcodes.observer.Observable<LifecycleStatusObserver>
-
subscribeObserver
- Specified by:
subscribeObserverin interfaceorg.refcodes.observer.Observable<LifecycleStatusObserver>
-
unsubscribeObserver
- Specified by:
unsubscribeObserverin interfaceorg.refcodes.observer.Observable<LifecycleStatusObserver>
-
initialize
public void initialize() throws org.refcodes.component.InitializeException- Specified by:
initializein interfaceorg.refcodes.component.Initializable- Overrides:
initializein classorg.refcodes.component.LifecycleAutomatonImpl- Throws:
org.refcodes.component.InitializeException
-
start
public void start() throws org.refcodes.component.StartException- Specified by:
startin interfaceorg.refcodes.component.Startable- Overrides:
startin classorg.refcodes.component.LifecycleAutomatonImpl- Throws:
org.refcodes.component.StartException
-
pause
public void pause() throws org.refcodes.component.PauseException- Specified by:
pausein interfaceorg.refcodes.component.Pausable- Overrides:
pausein classorg.refcodes.component.LifecycleAutomatonImpl- Throws:
org.refcodes.component.PauseException
-
resume
public void resume() throws org.refcodes.component.ResumeException- Specified by:
resumein interfaceorg.refcodes.component.Resumable- Overrides:
resumein classorg.refcodes.component.LifecycleAutomatonImpl- Throws:
org.refcodes.component.ResumeException
-
stop
public void stop() throws org.refcodes.component.StopException- Specified by:
stopin interfaceorg.refcodes.component.Stoppable- Overrides:
stopin classorg.refcodes.component.LifecycleAutomatonImpl- Throws:
org.refcodes.component.StopException
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.refcodes.component.Destroyable- Overrides:
destroyin classorg.refcodes.component.LifecycleAutomatonImpl
-