|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.mischiefbox.pollserve.ProcessorThread
Defines a message processor thread.
| Field Summary | |
protected boolean |
bActive
Indicates if this is currently in use (active). |
protected long |
lLastUsedMillis
The last used time of this processor thread. |
protected Message |
msg
The message to process. |
protected Queue |
qOutput
The output queue which will receive message results (if any). |
protected ThreadPool |
tpManager
Thread pool that manages this processor thread. |
protected Thread |
tProcessor
The processor thread. |
| Constructor Summary | |
ProcessorThread(ThreadPool tpManager)
Create a new processor thread. |
|
| Method Summary | |
long |
getLastUsed()
Gets the last used time. |
boolean |
isActive()
Indicates if this is actively processing. |
void |
process(Message msg,
Queue qOutput)
Process a message. |
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 Thread tProcessor
protected Message msg
protected Queue qOutput
protected ThreadPool tpManager
protected long lLastUsedMillis
protected boolean bActive
| Constructor Detail |
public ProcessorThread(ThreadPool tpManager)
| Method Detail |
public void process(Message msg,
Queue qOutput)
msg - the message to process.qOutput - the output that will receive message results.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 | ||||||||