public interface DispatchService
Note: Each execution thread owns its own dispatch queue.
Note: Dispatchs could result in further call to the dispatch service. This is because listener code that is invoked as a result of a dispatch may create patterns that fireStatementStopped as soon as they are started resulting in further dispatches within the same thread. Thus the implementation class must be careful with the use of iterators to avoid ConcurrentModificationException errors.
Modifier and Type | Method and Description |
---|---|
void |
addExternal(Dispatchable dispatchable)
Add a Dispatchable implementation.
|
void |
dispatch()
Execute all Dispatchable implementations added to the service since the last invocation of this method.
|
void addExternal(Dispatchable dispatchable)
dispatchable
- to execute latervoid dispatch()