class WebTaskWorker
extends java.lang.Thread
This helps in releasing the websocket (and thus the javascript's single-thread processing) so JS events can be captured/
| Modifier and Type | Field and Description |
|---|---|
private static CentralLogger |
LOG
Logger
|
private boolean |
running
Flag to control thread abort.
|
private java.util.LinkedList<java.lang.Runnable> |
webTasks
List of tasks sent by the JS side.
|
| Constructor and Description |
|---|
WebTaskWorker()
Create a new worker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
kill()
Terminate the thread.
|
void |
post(java.lang.Runnable task)
Post the given task to the queue.
|
void |
run()
Listening loop which waits for tasks to be posted to
webTasks. |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprivate static final CentralLogger LOG
private volatile boolean running
private final java.util.LinkedList<java.lang.Runnable> webTasks
public void run()
webTasks.run in interface java.lang.Runnablerun in class java.lang.Threadpublic void kill()
public void post(java.lang.Runnable task)
task - The task.