|
Quaqua 7.4.2 2011-07-05 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.randelshofer.quaqua.util.EventLoop
ch.randelshofer.quaqua.util.SequentialDispatcher
public class SequentialDispatcher
Processes Runnable objects sequentially on a processor thread. The order in which the runnable objects are processed is the same in which they were added to the dispatcher.
Design pattern used: Acceptor Role in design pattern: EventCollector and EventProcessor
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class ch.randelshofer.quaqua.util.EventLoop |
---|
clear, collectEvent, dispose, isCoalesce, isLIFO, processEvents, setCoalesce, setLIFO, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequentialDispatcher()
public SequentialDispatcher(int priority)
priority
- The Thread priority of the event processor.Method Detail |
---|
protected void processEvent(java.lang.Object event)
processEvent
in class EventLoop
event
- An event from the queue.public void dispatch(java.lang.Runnable r)
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |