edu.cuny.cat.task
Interface Dispatcher

All Known Implementing Classes:
AsynchronousDispatcher, PriorityAsynchronousDispatcher, PrioritySynchronousDispatcher, SynchronousDispatcher

public interface Dispatcher

The interface for processing dispatching tasks.

Version:
$Revision: 1.2 $
Author:
Jinzhong Niu

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.
 

Method Detail

addTask

void addTask(DispatchingTask task)
adds a dispatching task to process.

Parameters:
task - task to process

getTasks

DispatchingTask[] getTasks()
Returns:
the array of tasks yet to process.

process

void process()
to process the pending tasks.


processTask

void processTask(DispatchingTask task)
to add the task and process all pending tasks. This does exactly what addTask(DispatchingTask) and process() do together.

Parameters:
task -

terminate

void terminate()
terminates the dispatcher.