NASA World Wind

gov.nasa.worldwind.util
Class ThreadedTaskService

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.util.ThreadedTaskService
All Implemented Interfaces:
AVList, TaskService, WWObject, PropertyChangeListener, Thread.UncaughtExceptionHandler, EventListener

public class ThreadedTaskService
extends WWObjectImpl
implements TaskService, Thread.UncaughtExceptionHandler


Field Summary
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
ThreadedTaskService()
           
 
Method Summary
 void addTask(Runnable runnable)
          Enqueues a task to run.
 boolean contains(Runnable runnable)
           
 boolean hasActiveTasks()
           
 boolean isFull()
           
 void shutdown(boolean immediately)
           
 void uncaughtException(Thread thread, Throwable throwable)
           
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 

Constructor Detail

ThreadedTaskService

public ThreadedTaskService()
Method Detail

addTask

public void addTask(Runnable runnable)
Enqueues a task to run.

Specified by:
addTask in interface TaskService
Parameters:
runnable - the task to add
Throws:
IllegalArgumentException - if runnable is null

contains

public boolean contains(Runnable runnable)
Specified by:
contains in interface TaskService

hasActiveTasks

public boolean hasActiveTasks()
Specified by:
hasActiveTasks in interface TaskService

isFull

public boolean isFull()
Specified by:
isFull in interface TaskService

shutdown

public void shutdown(boolean immediately)
Specified by:
shutdown in interface TaskService

uncaughtException

public void uncaughtException(Thread thread,
                              Throwable throwable)
Specified by:
uncaughtException in interface Thread.UncaughtExceptionHandler

NASA World Wind