|
Treeviz 0.37 2010-10-17 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.util.EventLoop
ch.randelshofer.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.util.EventLoop |
|---|
clear, collectEvent, isCoalesce, processEvents, setCoalesce, 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 EventLoopevent - An event from the queue.public void dispatch(java.lang.Runnable r)
|
Copyright 2007-2008 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||