class WebClientProtocol.MessagesCollector.AppendMessageTask
extends java.lang.Object
implements java.lang.Runnable, java.io.Closeable
Modifier and Type | Field and Description |
---|---|
private boolean |
isLast
Indicates that it is a final packet of the original message
|
private int |
msgId
The target message id to collect
|
private java.nio.ByteBuffer |
payloadData
Payload data that should be added to build the original message
|
Constructor and Description |
---|
AppendMessageTask(int msgId,
java.nio.ByteBuffer payloadData,
boolean isLast)
Appends the provided payload data to the original message.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this append task and releases the system resources associated with the opened
file channel and cleans the map of the currently tracked messages.
|
void |
run()
Executes this task.
|
private final int msgId
private final java.nio.ByteBuffer payloadData
private final boolean isLast
public AppendMessageTask(int msgId, java.nio.ByteBuffer payloadData, boolean isLast)
msgId
- The original message id.payloadData
- The payload data nested in the .isLast
- public void run()
run
in interface java.lang.Runnable
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException