Class StateMachineObjectSupport<S,E>

java.lang.Object
org.springframework.statemachine.support.LifecycleObjectSupport
org.springframework.statemachine.support.StateMachineObjectSupport<S,E>
Type Parameters:
S - the type of state
E - the type of event
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, StateMachineReactiveLifecycle
Direct Known Subclasses:
AbstractStateMachine

public abstract class StateMachineObjectSupport<S,E> extends LifecycleObjectSupport implements org.springframework.beans.factory.BeanNameAware
Support and helper class for base state machine implementation.
  • Constructor Details

    • StateMachineObjectSupport

      public StateMachineObjectSupport()
  • Method Details

    • doStart

      protected void doStart()
    • setBeanName

      public void setBeanName(String name)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • getBeanName

      protected String getBeanName()
      Returns a bean name known to context per contract with BeanNameAware.
      Returns:
      a bean name
    • getStateMachineEventPublisher

      protected StateMachineEventPublisher getStateMachineEventPublisher()
      Gets the state machine event publisher.
      Returns:
      the state machine event publisher
    • setStateMachineEventPublisher

      public void setStateMachineEventPublisher(StateMachineEventPublisher stateMachineEventPublisher)
      Sets the state machine event publisher.
      Parameters:
      stateMachineEventPublisher - the new state machine event publisher
    • setContextEventsEnabled

      public void setContextEventsEnabled(boolean contextEventsEnabled)
      Set if context application events are enabled. Events are enabled by default. Set this to false if you don't want state machine to send application context events.
      Parameters:
      contextEventsEnabled - the enabled flag
    • getStateListener

      protected CompositeStateMachineListener<S,E> getStateListener()
    • getStateMachineMonitor

      protected CompositeStateMachineMonitor<S,E> getStateMachineMonitor()
    • notifyStateChanged

      protected void notifyStateChanged(StateContext<S,E> stateContext)
    • notifyStateEntered

      protected void notifyStateEntered(StateContext<S,E> stateContext)
    • notifyStateExited

      protected void notifyStateExited(StateContext<S,E> stateContext)
    • notifyEventNotAccepted

      protected void notifyEventNotAccepted(StateContext<S,E> stateContext)
    • notifyTransitionStart

      protected void notifyTransitionStart(StateContext<S,E> stateContext)
    • notifyTransition

      protected void notifyTransition(StateContext<S,E> stateContext)
    • notifyTransitionEnd

      protected void notifyTransitionEnd(StateContext<S,E> stateContext)
    • notifyStateMachineStarted

      protected void notifyStateMachineStarted(StateContext<S,E> stateContext)
    • notifyStateMachineStopped

      protected void notifyStateMachineStopped(StateContext<S,E> stateContext)
    • notifyStateMachineError

      protected void notifyStateMachineError(StateContext<S,E> stateContext)
    • notifyExtendedStateChanged

      protected void notifyExtendedStateChanged(Object key, Object value, StateContext<S,E> stateContext)
    • notifyTransitionMonitor

      protected void notifyTransitionMonitor(StateMachine<S,E> stateMachine, Transition<S,E> transition, long duration)
    • notifyActionMonitor

      protected void notifyActionMonitor(StateMachine<S,E> stateMachine, Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>> action, long duration)
    • getStateMachineInterceptors

      protected StateMachineInterceptorList<S,E> getStateMachineInterceptors()
    • setStateMachineInterceptors

      protected void setStateMachineInterceptors(List<StateMachineInterceptor<S,E>> interceptors)