public abstract class AbstractExecutionService<T extends StateMachine<T,S,E,C>,S,E,C> extends AbstractSubject implements ActionExecutionService<T,S,E,C>
ActionExecutionService.ActionEvent<T extends StateMachine<T,S,E,C>,S,E,C>, ActionExecutionService.AfterExecActionEvent<T extends StateMachine<T,S,E,C>,S,E,C>, ActionExecutionService.AfterExecActionListener<T extends StateMachine<T,S,E,C>,S,E,C>, ActionExecutionService.BeforeExecActionEvent<T extends StateMachine<T,S,E,C>,S,E,C>, ActionExecutionService.BeforeExecActionListener<T extends StateMachine<T,S,E,C>,S,E,C>, ActionExecutionService.ExecActionExceptionEvent<T extends StateMachine<T,S,E,C>,S,E,C>, ActionExecutionService.ExecActionExceptionListener<T extends StateMachine<T,S,E,C>,S,E,C>| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<Pair<String,List<org.squirrelframework.foundation.fsm.impl.AbstractExecutionService.ActionContext<T,S,E,C>>>> |
actionBuckets |
protected boolean |
dummyExecution |
| Constructor and Description |
|---|
AbstractExecutionService() |
| 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
ActionExecutionService.execute(). |
addListener, addListener, fireEvent, getListenerSize, isNotifiable, removeAllListeners, removeListener, removeListener, removeListener, removeListener, setNotifiableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, addListener, fireEvent, getListenerSize, isNotifiable, removeAllListeners, removeListener, removeListener, removeListener, removeListener, setNotifiableprotected final LinkedList<Pair<String,List<org.squirrelframework.foundation.fsm.impl.AbstractExecutionService.ActionContext<T extends StateMachine<T,S,E,C>,S,E,C>>>> actionBuckets
protected boolean dummyExecution
public void begin(String bucketName)
ActionExecutionServicepublic void defer(Action<T,S,E,C> action, S from, S to, E event, C context, T stateMachine)
ActionExecutionServicepublic void execute()
ActionExecutionServicepublic void reset()
ActionExecutionServicepublic void addExecActionListener(ActionExecutionService.BeforeExecActionListener<T,S,E,C> listener)
ActionExecutionServiceaddExecActionListener in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>listener - action execution listenerpublic void removeExecActionListener(ActionExecutionService.BeforeExecActionListener<T,S,E,C> listener)
ActionExecutionServiceremoveExecActionListener in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>listener - action execution listenerpublic void addExecActionListener(ActionExecutionService.AfterExecActionListener<T,S,E,C> listener)
ActionExecutionServiceaddExecActionListener in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>listener - action execution listenerpublic void removeExecActionListener(ActionExecutionService.AfterExecActionListener<T,S,E,C> listener)
ActionExecutionServiceremoveExecActionListener in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>listener - action execution listenerpublic void addExecActionExceptionListener(ActionExecutionService.ExecActionExceptionListener<T,S,E,C> listener)
ActionExecutionServiceaddExecActionExceptionListener in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>listener - action execution exception listenerpublic void removeExecActionExceptionListener(ActionExecutionService.ExecActionExceptionListener<T,S,E,C> listener)
ActionExecutionServiceremoveExecActionExceptionListener in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>listener - action execution exception listenerpublic void setDummyExecution(boolean dummyExecution)
ActionExecutionServiceActionExecutionService.execute().setDummyExecution in interface ActionExecutionService<T extends StateMachine<T,S,E,C>,S,E,C>Copyright © 2013–2016. All rights reserved.