T - type of State MachineS - type of StateE - type of EventC - type of Contextpublic interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C> extends Observable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ActionExecutionService.ActionEvent<T extends StateMachine<T,S,E,C>,S,E,C>
Action execution event
|
static interface |
ActionExecutionService.AfterExecActionEvent<T extends StateMachine<T,S,E,C>,S,E,C> |
static interface |
ActionExecutionService.AfterExecActionListener<T extends StateMachine<T,S,E,C>,S,E,C>
After Action execution listener
|
static interface |
ActionExecutionService.BeforeExecActionEvent<T extends StateMachine<T,S,E,C>,S,E,C> |
static interface |
ActionExecutionService.BeforeExecActionListener<T extends StateMachine<T,S,E,C>,S,E,C>
Before Action execution listener
|
static interface |
ActionExecutionService.ExecActionExceptionEvent<T extends StateMachine<T,S,E,C>,S,E,C> |
static interface |
ActionExecutionService.ExecActionExceptionListener<T extends StateMachine<T,S,E,C>,S,E,C> |
| Modifier and Type | Method and Description |
|---|---|
void |
addExecActionExceptionListener(ActionExecutionService.ExecActionExceptionListener<T,S,E,C> listener)
Add action execution exception listener which can be used for monitoring execution
|
void |
addExecActionListener(ActionExecutionService.AfterExecActionListener<T,S,E,C> listener)
Add after action execution listener which can be used for monitoring execution
|
void |
addExecActionListener(ActionExecutionService.BeforeExecActionListener<T,S,E,C> listener)
Add before action execution listener which can be used for monitoring execution
|
void |
begin(String bucketName)
Begin a action execution collection in the bucket.
|
void |
defer(Action<T,S,E,C> action,
S from,
S to,
E event,
C context,
T stateMachine)
Add action and all the execution parameters into execution context;
|
void |
execute()
Execute all the actions collected by front bucket.
|
void |
removeExecActionExceptionListener(ActionExecutionService.ExecActionExceptionListener<T,S,E,C> listener)
Remove action execution exception listener
|
void |
removeExecActionListener(ActionExecutionService.AfterExecActionListener<T,S,E,C> listener)
Remove after action execution listener
|
void |
removeExecActionListener(ActionExecutionService.BeforeExecActionListener<T,S,E,C> listener)
Remove before action execution listener
|
void |
reset()
Reset all deferred actions and its count
|
void |
setDummyExecution(boolean dummyExecution)
Set dummy execution true will cause no action being actually invoked when calling
execute(). |
addListener, addListener, fireEvent, getListenerSize, isNotifiable, removeAllListeners, removeListener, removeListener, removeListener, removeListener, setNotifiablevoid begin(String bucketName)
void execute()
void reset()
void setDummyExecution(boolean dummyExecution)
execute().dummyExecution - void defer(Action<T,S,E,C> action, S from, S to, E event, C context, T stateMachine)
action - activity to be executedfrom - source stateto - target stateevent - activity causecontext - external environment contextstateMachine - state machine referencevoid addExecActionListener(ActionExecutionService.BeforeExecActionListener<T,S,E,C> listener)
listener - action execution listenervoid removeExecActionListener(ActionExecutionService.BeforeExecActionListener<T,S,E,C> listener)
listener - action execution listenervoid addExecActionListener(ActionExecutionService.AfterExecActionListener<T,S,E,C> listener)
listener - action execution listenervoid removeExecActionListener(ActionExecutionService.AfterExecActionListener<T,S,E,C> listener)
listener - action execution listenervoid addExecActionExceptionListener(ActionExecutionService.ExecActionExceptionListener<T,S,E,C> listener)
listener - action execution exception listenervoid removeExecActionExceptionListener(ActionExecutionService.ExecActionExceptionListener<T,S,E,C> listener)
listener - action execution exception listenerCopyright © 2013–2016. All rights reserved.