org.gjt.sp.util
Class TaskManager

java.lang.Object
  extended by org.gjt.sp.util.TaskManager

public class TaskManager
extends java.lang.Object

The TaskManager manage Tasks in the Threadpool, it knows all of them, and sends events to TaskListeners.


Nested Class Summary
static interface TaskManager.TaskVisitor
           
 
Field Summary
static TaskManager instance
           
 
Method Summary
 void addTaskListener(TaskListener listener)
           
 int countTasks()
          Return the number of tasks in queue.
 void removeTaskListener(TaskListener listener)
           
 void visit(TaskManager.TaskVisitor visitor)
          Visit all tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final TaskManager instance
Method Detail

countTasks

public int countTasks()
Return the number of tasks in queue.

Returns:
the number of tasks in queue
Since:
jEdit 4.5pre1

addTaskListener

public void addTaskListener(TaskListener listener)

removeTaskListener

public void removeTaskListener(TaskListener listener)

visit

public void visit(TaskManager.TaskVisitor visitor)
Visit all tasks. While doing this the task list is locked

Parameters:
visitor - the visitor