Class MethodSelfTransition
java.lang.Object
org.apache.mina.statemachine.transition.AbstractSelfTransition
org.apache.mina.statemachine.transition.MethodSelfTransition
- All Implemented Interfaces:
SelfTransition
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMethodSelfTransition(Method method, Object target) Creates a new MethodSelfTransition instanceMethodSelfTransition(String methodName, Object target) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionbooleandoExecute(StateContext stateContext, State state) Executes thisSelfTransition.private voidinvokeMethod(Object[] arguments) Methods inherited from class AbstractSelfTransition
execute
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
method
-
target
-
EMPTY_ARGUMENTS
-
-
Constructor Details
-
MethodSelfTransition
-
MethodSelfTransition
-
-
Method Details
-
getMethod
-
doExecute
Executes thisSelfTransition.- Specified by:
doExecutein classAbstractSelfTransition- Parameters:
stateContext- the context in which the execution should occurstate- the current state- Returns:
trueif theSelfTransitionhas been executed successfully
-
invokeMethod
-