S
- the type of stateE
- the type of eventpublic class StateMachineHandler<S,E>
extends java.lang.Object
implements org.springframework.core.Ordered
WithStateMachine
and OnTransition
annotations.Constructor and Description |
---|
StateMachineHandler(java.lang.Class<?> beanClass,
MethodInvokingStateMachineRuntimeProcessor<T,S,E> processor)
Instantiates a new container handler.
|
StateMachineHandler(java.lang.Class<?> beanClass,
java.lang.Object target,
java.lang.reflect.Method method)
Instantiates a new container handler.
|
StateMachineHandler(java.lang.Class<?> beanClass,
java.lang.Object target,
java.lang.String methodName)
Instantiates a new container handler.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getBeanClass()
Gets the bean class.
|
int |
getOrder() |
java.lang.Object |
handle(StateMachineRuntime<S,E> stateMachineRuntime)
Handle container using a
StateMachineRuntimeProcessor . |
void |
setOrder(int order)
Sets the order used get value from
getOrder() . |
public StateMachineHandler(java.lang.Class<?> beanClass, java.lang.Object target, java.lang.reflect.Method method)
beanClass
- the bean classtarget
- the target beanmethod
- the methodpublic StateMachineHandler(java.lang.Class<?> beanClass, java.lang.Object target, java.lang.String methodName)
beanClass
- the bean classtarget
- the target beanmethodName
- the method namepublic StateMachineHandler(java.lang.Class<?> beanClass, MethodInvokingStateMachineRuntimeProcessor<T,S,E> processor)
T
- the generic typebeanClass
- the bean classprocessor
- the processorpublic int getOrder()
getOrder
in interface org.springframework.core.Ordered
public java.lang.Class<?> getBeanClass()
public void setOrder(int order)
getOrder()
.
Default value is Ordered.LOWEST_PRECEDENCE
.order
- the new orderpublic java.lang.Object handle(StateMachineRuntime<S,E> stateMachineRuntime)
StateMachineRuntimeProcessor
.stateMachineRuntime
- the state machine runtime