Class InitialTransition<S,E>

java.lang.Object
org.springframework.statemachine.transition.AbstractTransition<S,E>
org.springframework.statemachine.transition.InitialTransition<S,E>
Type Parameters:
S - the type of state
E - the type of event
All Implemented Interfaces:
Transition<S,E>

public class InitialTransition<S,E> extends AbstractTransition<S,E>
Transition used during a state machine start.
  • Constructor Details

    • InitialTransition

      public InitialTransition(State<S,E> target)
      Instantiates a new initial transition.
      Parameters:
      target - the target
    • InitialTransition

      public InitialTransition(State<S,E> target, Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>> action)
      Instantiates a new initial transition.
      Parameters:
      target - the target
      action - the action
    • InitialTransition

      public InitialTransition(State<S,E> target, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> actions)
      Instantiates a new initial transition.
      Parameters:
      target - the target
      actions - the actions
  • Method Details

    • transit

      public reactor.core.publisher.Mono<Boolean> transit(StateContext<S,E> context)
      Description copied from interface: Transition
      Transit this transition with a give state context.
      Specified by:
      transit in interface Transition<S,E>
      Overrides:
      transit in class AbstractTransition<S,E>
      Parameters:
      context - the state context
      Returns:
      Mono for completion with true, if transition happened, false otherwise