Interface Transition<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Known Implementing Classes:
AbstractExternalTransition, AbstractInternalTransition, AbstractLocalTransition, AbstractTransition, DefaultExternalTransition, DefaultInternalTransition, DefaultLocalTransition, InitialTransition

public interface Transition<S,E>
Transition is something what a state machine associates with a state changes.
Author:
Janne Valkealahti
  • Method Details

    • transit

      reactor.core.publisher.Mono<Boolean> transit(StateContext<S,E> context)
      Transit this transition with a give state context.
      Parameters:
      context - the state context
      Returns:
      Mono for completion with true, if transition happened, false otherwise
    • executeTransitionActions

      reactor.core.publisher.Mono<Void> executeTransitionActions(StateContext<S,E> context)
      Execute transition actions.
      Parameters:
      context - the state context
      Returns:
      mono for completion
    • getSource

      State<S,E> getSource()
      Gets the source state of this transition.
      Returns:
      the source state
    • getTarget

      State<S,E> getTarget()
      Gets the target state of this transition.
      Returns:
      the target state
    • getGuard

      Function<StateContext<S,E>,reactor.core.publisher.Mono<Boolean>> getGuard()
      Gets the guard of this transition.
      Returns:
      the guard
    • getActions

      Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> getActions()
      Gets the transition actions.
      Returns:
      the transition actions
    • getTrigger

      Trigger<S,E> getTrigger()
      Gets the transition trigger.
      Returns:
      the transition trigger
    • getKind

      TransitionKind getKind()
      Gets the transition kind.
      Returns:
      the transition kind
    • getSecurityRule

      SecurityRule getSecurityRule()
      Gets the security rule.
      Returns:
      the security rule
    • getName

      String getName()
      Gets the name.
      Returns:
      the name
    • addActionListener

      void addActionListener(ActionListener<S,E> listener)
      Adds the action listener.
      Parameters:
      listener - the listener
    • removeActionListener

      void removeActionListener(ActionListener<S,E> listener)
      Removes the action listener.
      Parameters:
      listener - the listener