public class ThreadedTaskService extends WWObjectImpl implements TaskService, Thread.UncaughtExceptionHandler
Constructor and Description |
---|
ThreadedTaskService() |
Modifier and Type | Method and Description |
---|---|
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) |
onMessage, propertyChange
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
public void addTask(Runnable runnable)
addTask
in interface TaskService
runnable
- the task to addIllegalArgumentException
- if runnable
is nullpublic boolean contains(Runnable runnable)
contains
in interface TaskService
public boolean hasActiveTasks()
hasActiveTasks
in interface TaskService
public boolean isFull()
isFull
in interface TaskService
public void shutdown(boolean immediately)
shutdown
in interface TaskService
public void uncaughtException(Thread thread, Throwable throwable)
uncaughtException
in interface Thread.UncaughtExceptionHandler