public class SequentialDispatcher extends EventLoop
Design pattern used: Acceptor Role in design pattern: EventCollector and EventProcessor
| Constructor and Description |
|---|
SequentialDispatcher()
Creates new SequentialDispatcher which processes Runnable objects
at java.lang.Thread.NORM_PRIORITY.
|
SequentialDispatcher(int priority)
Creates a new SequentialDispatcher which processes Runnable Objects
at the desired thread priority.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispatch(java.lang.Runnable r)
Queues the Runnable object for later execution on the
processor thread.
|
protected void |
processEvent(java.lang.Object event)
This method processes an event on the event processor thread.
|
clear, collectEvent, isCoalesce, processEvents, setCoalesce, start, stoppublic SequentialDispatcher()
public SequentialDispatcher(int priority)
priority - The Thread priority of the event processor.protected void processEvent(java.lang.Object event)
processEvent in class EventLoopevent - An event from the queue.public void dispatch(java.lang.Runnable r)