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.
| Constructor and Description |
|---|
MethodSelfTransition(Method method,
Object target)
Creates a new MethodSelfTransition instance
|
MethodSelfTransition(String methodName,
Object target)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
doExecute(StateContext stateContext,
State state)
Executes this
SelfTransition. |
Method |
getMethod() |
executepublic MethodSelfTransition(Method method, Object target)
method - The method to invoketarget - The target objectpublic boolean doExecute(StateContext stateContext, State state)
SelfTransition.doExecute in class AbstractSelfTransitionstateContext - the context in which the execution should occurstate - the current statetrue if the SelfTransition has been executed
successfullyCopyright © 2004–2023 Apache MINA Project. All rights reserved.