Package gov.nasa.worldwind.util
Class ThreadedTaskService
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.util.ThreadedTaskService
-
- All Implemented Interfaces:
AVList
,MessageListener
,TaskService
,WWObject
,java.beans.PropertyChangeListener
,java.lang.Thread.UncaughtExceptionHandler
,java.util.EventListener
public class ThreadedTaskService extends WWObjectImpl implements TaskService, java.lang.Thread.UncaughtExceptionHandler
-
-
Constructor Summary
Constructors Constructor Description ThreadedTaskService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTask(java.lang.Runnable runnable)
Enqueues a task to run.boolean
contains(java.lang.Runnable runnable)
boolean
hasActiveTasks()
boolean
isFull()
void
shutdown(boolean immediately)
void
uncaughtException(java.lang.Thread thread, java.lang.Throwable throwable)
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from class java.lang.Object
clone, equals, 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
-
-
-
-
Method Detail
-
shutdown
public void shutdown(boolean immediately)
- Specified by:
shutdown
in interfaceTaskService
-
uncaughtException
public void uncaughtException(java.lang.Thread thread, java.lang.Throwable throwable)
- Specified by:
uncaughtException
in interfacejava.lang.Thread.UncaughtExceptionHandler
-
contains
public boolean contains(java.lang.Runnable runnable)
- Specified by:
contains
in interfaceTaskService
-
addTask
public void addTask(java.lang.Runnable runnable)
Enqueues a task to run.- Specified by:
addTask
in interfaceTaskService
- Parameters:
runnable
- the task to add- Throws:
java.lang.IllegalArgumentException
- ifrunnable
is null
-
isFull
public boolean isFull()
- Specified by:
isFull
in interfaceTaskService
-
hasActiveTasks
public boolean hasActiveTasks()
- Specified by:
hasActiveTasks
in interfaceTaskService
-
-