Class ObservableLifecycleRequestAutomatonImpl

java.lang.Object
org.refcodes.component.LifecycleAutomatonImpl
org.refcodes.component.ext.observer.ObservableLifecycleRequestAutomatonImpl
All Implemented Interfaces:
org.refcodes.component.Destroyable, org.refcodes.component.Destroyable.DestroyAutomaton, ObservableLifecycleRequestAutomaton, 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<LifecycleRequestObserver>

public class ObservableLifecycleRequestAutomatonImpl extends org.refcodes.component.LifecycleAutomatonImpl implements ObservableLifecycleRequestAutomaton, 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.ManualLifecycleAutomatonImpl

    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 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

    Nested 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.UncheckedStartable

    Nested 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

    Constructors
    Constructor
    Description
    Instantiates a new observable life cycle request automaton impl.
    ObservableLifecycleRequestAutomatonImpl(Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
    ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    boolean
    void
    void
    void
    void
    void
    boolean
    boolean

    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.refcodes.component.Initializable

    initializeUnchecked

    Methods inherited from interface org.refcodes.mixin.Loggable

    alert, alert, critical, critical, debug, error, info, notice, panic, trace, warn, warn

    Methods inherited from interface org.refcodes.component.Pausable

    pauseUnchecked

    Methods inherited from interface org.refcodes.component.Resumable

    resumeUnchecked

    Methods inherited from interface org.refcodes.component.Startable

    startUnchecked

    Methods inherited from interface org.refcodes.component.Stoppable

    stopUnchecked
  • Constructor Details

    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl()
      Instantiates a new observable life cycle request automaton impl.
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(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.mixin.EventMetaData aEventMetaData)
      Parameters:
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, 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 - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent)
      Parameters:
      aLifecycleComponent - The LifecycleComponent to which the life-cycle method calls are to be delegated to.
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource)
      Parameters:
      aLifecycleComponent - The LifecycleComponent 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.mixin.EventMetaData aEventMetaData)
      Parameters:
      aLifecycleComponent - The LifecycleComponent to which the life-cycle method calls are to be delegated to.
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource)
      Parameters:
      aLifecycleComponent - The LifecycleComponent to which the life-cycle method calls are to be delegated to.
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
      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(ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aExecutorService - The executor service to be used when firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(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 firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
      aExecutorService - The executor service to be used when firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
      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 firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aLifecycleComponent - The LifecycleComponent to which the life-cycle method calls are to be delegated to.
      aExecutorService - The executor service to be used when firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aLifecycleComponent - The LifecycleComponent 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 firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aLifecycleComponent - The LifecycleComponent to which the life-cycle method calls are to be delegated to.
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
      aExecutorService - The executor service to be used when firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
    • ObservableLifecycleRequestAutomatonImpl

      public ObservableLifecycleRequestAutomatonImpl(org.refcodes.component.LifecycleComponent aLifecycleComponent, org.refcodes.mixin.EventMetaData aEventMetaData, Object aSource, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
      Parameters:
      aLifecycleComponent - The LifecycleComponent to which the life-cycle method calls are to be delegated to.
      aEventMetaData - The EventMetaData to be used when firing events in case the EventMetaData is to be different from the auto-generated EventMetaData.
      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 firing GenericActionEvent instances in multiple threads (if null then a default one is used).
      aExecutionStrategy - The ExecutionStrategy to be used when firing GenericActionEvent instance (if null then the default ExecutionStrategy.SEQUENTIAL is used).
  • Method Details

    • hasObserverSubscription

      public boolean hasObserverSubscription(LifecycleRequestObserver aObserver)
      Specified by:
      hasObserverSubscription in interface org.refcodes.observer.Observable<LifecycleRequestObserver>
    • subscribeObserver

      public boolean subscribeObserver(LifecycleRequestObserver aObserver)
      Specified by:
      subscribeObserver in interface org.refcodes.observer.Observable<LifecycleRequestObserver>
    • unsubscribeObserver

      public boolean unsubscribeObserver(LifecycleRequestObserver aObserver)
      Specified by:
      unsubscribeObserver in interface org.refcodes.observer.Observable<LifecycleRequestObserver>
    • initialize

      public void initialize() throws org.refcodes.component.InitializeException
      Specified by:
      initialize in interface org.refcodes.component.Initializable
      Overrides:
      initialize in class org.refcodes.component.LifecycleAutomatonImpl
      Throws:
      org.refcodes.component.InitializeException
    • start

      public void start() throws org.refcodes.component.StartException
      Specified by:
      start in interface org.refcodes.component.Startable
      Overrides:
      start in class org.refcodes.component.LifecycleAutomatonImpl
      Throws:
      org.refcodes.component.StartException
    • pause

      public void pause() throws org.refcodes.component.PauseException
      Specified by:
      pause in interface org.refcodes.component.Pausable
      Overrides:
      pause in class org.refcodes.component.LifecycleAutomatonImpl
      Throws:
      org.refcodes.component.PauseException
    • resume

      public void resume() throws org.refcodes.component.ResumeException
      Specified by:
      resume in interface org.refcodes.component.Resumable
      Overrides:
      resume in class org.refcodes.component.LifecycleAutomatonImpl
      Throws:
      org.refcodes.component.ResumeException
    • stop

      public void stop() throws org.refcodes.component.StopException
      Specified by:
      stop in interface org.refcodes.component.Stoppable
      Overrides:
      stop in class org.refcodes.component.LifecycleAutomatonImpl
      Throws:
      org.refcodes.component.StopException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.refcodes.component.Destroyable
      Overrides:
      destroy in class org.refcodes.component.LifecycleAutomatonImpl