|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cuny.cat.task.SynchronousDispatcher
public class SynchronousDispatcher
A synchronous event dispatcher without any internal thread.
| Field Summary | |
|---|---|
protected boolean |
running
|
protected DispatchingTaskQueue |
tasks
|
| Constructor Summary | |
|---|---|
SynchronousDispatcher()
|
|
| Method Summary | |
|---|---|
void |
addTask(DispatchingTask task)
adds a dispatching task to process. |
DispatchingTask[] |
getTasks()
|
void |
process()
to process the pending tasks. |
void |
processTask(DispatchingTask task)
to add the task and process all pending tasks. |
void |
terminate()
terminates the dispatcher. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DispatchingTaskQueue tasks
protected boolean running
| Constructor Detail |
|---|
public SynchronousDispatcher()
| Method Detail |
|---|
public void addTask(DispatchingTask task)
Dispatcher
addTask in interface Dispatchertask - task to processpublic void process()
Dispatcher
process in interface Dispatcherpublic void processTask(DispatchingTask task)
DispatcherDispatcher.addTask(DispatchingTask) and Dispatcher.process() do together.
processTask in interface Dispatcherpublic void terminate()
Dispatcher
terminate in interface Dispatcherpublic DispatchingTask[] getTasks()
getTasks in interface Dispatcher
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||