class MultiThreadedMessageDispatcher.MessageTask extends java.lang.Object implements WorkerTask
| Modifier and Type | Field and Description |
|---|---|
private Address |
incomingAddress |
private TransportMapping |
sourceTransport |
private TransportStateReference |
tmStateReference |
private java.nio.ByteBuffer |
wholeMessage |
| Constructor and Description |
|---|
MessageTask(TransportMapping sourceTransport,
Address incomingAddress,
java.nio.ByteBuffer wholeMessage,
TransportStateReference tmStateReference) |
| Modifier and Type | Method and Description |
|---|---|
void |
interrupt()
Interrupts this task.
|
void |
join()
Waits until this task has been finished.
|
void |
run() |
void |
terminate()
The
WorkerPool might call this method to hint the active
WorkTask instance to complete execution as soon as possible. |
private TransportMapping sourceTransport
private Address incomingAddress
private java.nio.ByteBuffer wholeMessage
private TransportStateReference tmStateReference
public MessageTask(TransportMapping sourceTransport, Address incomingAddress, java.nio.ByteBuffer wholeMessage, TransportStateReference tmStateReference)
public void run()
run in interface java.lang.Runnablepublic void terminate()
WorkerTaskWorkerPool might call this method to hint the active
WorkTask instance to complete execution as soon as possible.terminate in interface WorkerTaskpublic void join()
throws java.lang.InterruptedException
WorkerTaskjoin in interface WorkerTaskjava.lang.InterruptedExceptionpublic void interrupt()
WorkerTaskinterrupt in interface WorkerTaskThread.interrupt()