Class ObservableLifeCycleRequestAutomatonImpl
- java.lang.Object
-
- org.refcodes.component.LifeCycleAutomatonImpl
-
- org.refcodes.component.ext.observer.ObservableLifeCycleRequestAutomatonImpl
-
- All Implemented Interfaces:
ObservableLifeCycleRequestAutomaton
,org.refcodes.mixin.Loggable
,org.refcodes.observer.Observable<LifeCycleRequestObserver>
public class ObservableLifeCycleRequestAutomatonImpl extends org.refcodes.component.LifeCycleAutomatonImpl implements ObservableLifeCycleRequestAutomaton, org.refcodes.mixin.Loggable
Abstract implementation of theObservableLifeCycleStatusAutomaton
interface with the according hook methods for you to create your domain drivenObservableLifeCycleStatusAutomaton
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomaton
-
Nested 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.UncheckedInitializable
-
Nested classes/interfaces inherited from interface org.refcodes.component.InitializedAccessor
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedProperty
-
Nested classes/interfaces inherited from class org.refcodes.component.LifeCycleAutomatonImpl
org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl
-
Nested classes/interfaces inherited from interface org.refcodes.component.LifeCycleComponent
org.refcodes.component.LifeCycleComponent.LifeCycleAutomaton, org.refcodes.component.LifeCycleComponent.UncheckedLifeCycleComponent
-
Nested 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.LifeCycleStatusProperty
-
Nested 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.UncheckedPausable
-
Nested 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.UncheckedResumable
-
Nested classes/interfaces inherited from interface org.refcodes.component.RunningAccessor
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningProperty
-
-
Constructor Summary
Constructors Constructor Description ObservableLifeCycleRequestAutomatonImpl()
Instantiates a new observable life cycle request automaton impl.ObservableLifeCycleRequestAutomatonImpl(java.lang.Object aSource)
ObservableLifeCycleRequestAutomatonImpl(java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, java.lang.Object aSource)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
boolean
hasObserverSubscription(LifeCycleRequestObserver aObserver)
void
initialize()
void
pause()
void
resume()
void
start()
void
stop()
boolean
subscribeObserver(LifeCycleRequestObserver aObserver)
boolean
unsubscribeObserver(LifeCycleRequestObserver aObserver)
-
Methods inherited from class org.refcodes.component.LifeCycleAutomatonImpl
getLifeCycleComponent, getLifeCycleStatus, isDestroyable, isDestroyed, isInitalizable, isInitialized, isPausable, isPaused, isResumable, isRunning, isStartable, isStoppable, isStopped, setLifeCycleStatus
-
Methods inherited from interface org.refcodes.mixin.Loggable
alert, alert, critical, critical, debug, error, info, notice, panic, trace, warn, warn
-
-
-
-
Constructor Detail
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl()
Instantiates a new observable life cycle request automaton impl.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(java.lang.Object aSource)
- Parameters:
aSource
- The source instance to be used when firing events in case the source is to be different from this class' instance.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData)
- Parameters:
aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is to be different from the auto-generatedEventMetaData
.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource)
- Parameters:
aSource
- The source instance to be used when firing events in case the source is to be different from this class' instance.aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is to be different from the auto-generatedEventMetaData
.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to which the life-cycle method calls are to be delegated to.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, java.lang.Object aSource)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to 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.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to which the life-cycle method calls are to be delegated to.aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is to be different from the auto-generatedEventMetaData
.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to which the life-cycle method calls are to be delegated to.aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is 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.
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aExecutorService
- The executor service to be used when firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(java.lang.Object aSource, java.util.concurrent.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 firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is to be different from the auto-generatedEventMetaData
.aExecutorService
- The executor service to be used when firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is 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 firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to which the life-cycle method calls are to be delegated to.aExecutorService
- The executor service to be used when firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to 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 firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to which the life-cycle method calls are to be delegated to.aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is to be different from the auto-generatedEventMetaData
.aExecutorService
- The executor service to be used when firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
ObservableLifeCycleRequestAutomatonImpl
public ObservableLifeCycleRequestAutomatonImpl(org.refcodes.component.LifeCycleComponent aLifeCycleComponent, org.refcodes.observer.EventMetaData aEventMetaData, java.lang.Object aSource, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
- Parameters:
aLifeCycleComponent
- TheLifeCycleComponent
to which the life-cycle method calls are to be delegated to.aEventMetaData
- TheEventMetaData
to be used when firing events in case theEventMetaData
is 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 firingGenericActionEvent
instances in multiple threads (if null then a default one is used).aExecutionStrategy
- TheExecutionStrategy
to be used when firingGenericActionEvent
instance (if null then the defaultExecutionStrategy.SEQUENTIAL
is used).
-
-
Method Detail
-
hasObserverSubscription
public boolean hasObserverSubscription(LifeCycleRequestObserver aObserver)
- Specified by:
hasObserverSubscription
in interfaceorg.refcodes.observer.Observable<LifeCycleRequestObserver>
-
subscribeObserver
public boolean subscribeObserver(LifeCycleRequestObserver aObserver)
- Specified by:
subscribeObserver
in interfaceorg.refcodes.observer.Observable<LifeCycleRequestObserver>
-
unsubscribeObserver
public boolean unsubscribeObserver(LifeCycleRequestObserver aObserver)
- Specified by:
unsubscribeObserver
in interfaceorg.refcodes.observer.Observable<LifeCycleRequestObserver>
-
initialize
public void initialize() throws org.refcodes.component.InitializeException
- Overrides:
initialize
in classorg.refcodes.component.LifeCycleAutomatonImpl
- Throws:
org.refcodes.component.InitializeException
-
start
public void start() throws org.refcodes.component.StartException
- Overrides:
start
in classorg.refcodes.component.LifeCycleAutomatonImpl
- Throws:
org.refcodes.component.StartException
-
pause
public void pause() throws org.refcodes.component.PauseException
- Overrides:
pause
in classorg.refcodes.component.LifeCycleAutomatonImpl
- Throws:
org.refcodes.component.PauseException
-
resume
public void resume() throws org.refcodes.component.ResumeException
- Overrides:
resume
in classorg.refcodes.component.LifeCycleAutomatonImpl
- Throws:
org.refcodes.component.ResumeException
-
stop
public void stop() throws org.refcodes.component.StopException
- Overrides:
stop
in classorg.refcodes.component.LifeCycleAutomatonImpl
- Throws:
org.refcodes.component.StopException
-
destroy
public void destroy()
- Overrides:
destroy
in classorg.refcodes.component.LifeCycleAutomatonImpl
-
-