|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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>
State machine action executor. The action defined during state entry/exit and transition will be collected by action executor, and executed later together. The executor can execute actions in synchronize and synchronize manner.
| Nested Class Summary | |
|---|---|
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>
|
| Method Summary | |
|---|---|
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(). |
| Methods inherited from interface org.squirrelframework.foundation.component.Observable |
|---|
addListener, addListener, fireEvent, getListenerSize, isNotifiable, removeAllListeners, removeListener, removeListener, removeListener, removeListener, setNotifiable |
| Method Detail |
|---|
void 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 listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||