public class QueueProcessorThread
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
static boolean |
CHANGE_PRIORITY |
| Constructor and Description |
|---|
QueueProcessorThread(java.lang.String name) |
QueueProcessorThread(java.lang.String name,
int num) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToInbox(java.lang.Object obj) |
void |
awaitTermination() |
void |
clearInbox() |
java.util.Vector |
getInbox() |
boolean |
isRunning() |
void |
kill() |
void |
process(java.lang.Object object)
Override this method to be able to handle other types of object apart from Runnable.
|
void |
run() |
void |
start() |
public QueueProcessorThread(java.lang.String name)
public QueueProcessorThread(java.lang.String name,
int num)
public void start()
public void kill()
ExecutorService.shutdown(),
ExecutorService.shutdownNow()public void awaitTermination()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionExecutorService.awaitTermination(long, java.util.concurrent.TimeUnit)public void run()
run in interface java.lang.Runnablepublic void addToInbox(java.lang.Object obj)
Executor.execute(java.lang.Runnable),
ExecutorService.submit(java.lang.Runnable)public boolean isRunning()
ExecutorService.isShutdown()public void clearInbox()
public java.util.Vector getInbox()
public void process(java.lang.Object object)
throws java.lang.Exception
java.lang.Exception