| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
edu.cuny.cat.task.AsynchronousDispatcher
public class AsynchronousDispatcher
An asynchronous dispatcher that runs a thread to process dispatching tasks
 buffered in a queue.
 
 TODO: to use Executors to schedule tasks.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class java.lang.Thread | 
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler | 
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger | 
logger
 | 
| Fields inherited from class java.lang.Thread | 
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY | 
| Constructor Summary | |
|---|---|
AsynchronousDispatcher()
 | 
|
| 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 | 
run()
 | 
 void | 
terminate()
terminates the dispatcher.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class java.lang.Thread | 
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield | 
| Methods inherited from class java.lang.Object | 
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected static org.apache.log4j.Logger logger
| Constructor Detail | 
|---|
public AsynchronousDispatcher()
| Method Detail | 
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic 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 java.lang.String toString()
toString in class java.lang.Threadpublic DispatchingTask[] getTasks()
getTasks in interface Dispatcher
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||