Interface StateMachineExecutor<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Superinterfaces:
StateMachineReactiveLifecycle
All Known Implementing Classes:
ReactiveStateMachineExecutor

public interface StateMachineExecutor<S,E> extends StateMachineReactiveLifecycle
Interface for a StateMachine event executor.
Author:
Janne Valkealahti
  • Method Details

    • queueEvent

      reactor.core.publisher.Mono<Void> queueEvent(reactor.core.publisher.Mono<org.springframework.messaging.Message<E>> message, StateMachineExecutor.StateMachineExecutorCallback callback)
      Queue event.
      Parameters:
      message - the message
      callback - the executor callback
      Returns:
      completion when event is queued
    • queueDeferredEvent

      void queueDeferredEvent(org.springframework.messaging.Message<E> message)
      Queue deferred event.
      Parameters:
      message - the message
    • executeTriggerlessTransitions

      reactor.core.publisher.Mono<Void> executeTriggerlessTransitions(StateContext<S,E> context, State<S,E> state)
      Execute and check all triggerless transitions.
      Parameters:
      context - the state context
      state - the state
      Returns:
      completion when handled
    • setInitialEnabled

      void setInitialEnabled(boolean enabled)
      Sets the if initial stage is enabled.
      Parameters:
      enabled - the new flag
    • setForwardedInitialEvent

      void setForwardedInitialEvent(org.springframework.messaging.Message<E> message)
      Set initial forwarded event.
      Parameters:
      message - the forwarded message
      See Also:
    • setStateMachineExecutorTransit

      void setStateMachineExecutorTransit(StateMachineExecutor.StateMachineExecutorTransit<S,E> stateMachineExecutorTransit)
      Sets the state machine executor transit.
      Parameters:
      stateMachineExecutorTransit - the state machine executor transit
    • addStateMachineInterceptor

      void addStateMachineInterceptor(StateMachineInterceptor<S,E> interceptor)
      Adds the state machine interceptor.
      Parameters:
      interceptor - the interceptor