Class MethodSelfTransition

java.lang.Object
org.apache.mina.statemachine.transition.AbstractSelfTransition
org.apache.mina.statemachine.transition.MethodSelfTransition
All Implemented Interfaces:
SelfTransition

public class MethodSelfTransition extends AbstractSelfTransition
SelfTransition which invokes a Method. The Method can have zero or any number of StateContext and State regarding order

Normally you wouldn't create instances of this class directly but rather use the SelfTransition annotation to define the methods which should be used as transitions in your state machine and then let StateMachineFactory create a StateMachine for you.

  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • method

      private Method method
    • target

      private final Object target
    • EMPTY_ARGUMENTS

      private static final Object[] EMPTY_ARGUMENTS
  • Constructor Details

    • MethodSelfTransition

      public MethodSelfTransition(Method method, Object target)
      Creates a new MethodSelfTransition instance
      Parameters:
      method - The method to invoke
      target - The target object
    • MethodSelfTransition

      public MethodSelfTransition(String methodName, Object target)
      Creates a new instance
      Parameters:
      methodName - the target method.
      target - the target object.
  • Method Details