|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.mischiefbox.dmud.util.ProcessorThread
Defines a message processor thread.
| Field Summary | |
protected boolean |
bActive
Indicates if this is currently in use (active). |
protected boolean |
bProcessing
Indicates if this is processing (thread started). |
protected long |
lLastUsedMillis
The last used time of this processor thread. |
protected long |
lShutdownMillis
The time when this will be idle too long and be shut down automatically. |
protected Message |
msg
The message to process. |
protected PythonInterpreter |
pyInterp
The processor thread's python interpreter. |
protected Queue |
qInput
The input queue with new messages to be processed. |
protected Queue |
qOutput
The output queue that will receive messages processed by this thread. |
protected int |
SLEEP_MILLIS
Idle thread sleep time (between waking up to check status). |
protected ThreadGroup |
tgManager
The thread group that contains this processor thread. |
protected Thread |
tProcessor
The processor thread. |
| Constructor Summary | |
ProcessorThread(ThreadGroup tgManager,
Queue qInput,
Queue qOutput)
Create a new processor thread. |
|
| Method Summary | |
long |
getLastUsed()
Gets the last used time. |
boolean |
isActive()
Indicates if this is actively processing. |
void |
run()
Process the message and put the results (if any) on the output queue. |
void |
shutdown()
Shut down the processor thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int SLEEP_MILLIS
protected Thread tProcessor
protected Message msg
protected long lLastUsedMillis
protected long lShutdownMillis
protected boolean bActive
protected boolean bProcessing
protected PythonInterpreter pyInterp
protected Queue qInput
protected Queue qOutput
protected ThreadGroup tgManager
| Constructor Detail |
public ProcessorThread(ThreadGroup tgManager,
Queue qInput,
Queue qOutput)
tgManager - the thread group that owns this thread.qInput - the input queue on which new messages are found.qOutput - the output queue which received processed
messages.| Method Detail |
public void run()
run in interface Runnablepublic void shutdown()
public boolean isActive()
public long getLastUsed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||