class WebClientProtocol.MessagesCollector
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
WebClientProtocol.MessagesCollector.AppendMessageTask
The task that appends a new partial message to the already received messages having the same
id number (or belonging to the same packet of messages).
|
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ExecutorService |
asynchIOExecutor
Executes tasks to collect partial messages having the same id number to a one large
binary message.
|
private java.util.Map<java.lang.Integer,java.nio.channels.FileChannel> |
partialMessages
Partial messages are mapped to temporary files channels.
|
private java.util.Map<java.lang.Integer,java.lang.Byte> |
payloadMessagesTypes
Partial messages are mapped to their payload data types.
|
private java.nio.file.Path |
tmpDir
The directory to save partial messages to the corresponding temporary file
|
Modifier | Constructor and Description |
---|---|
private |
MessagesCollector()
Creates the instance.
|
Modifier and Type | Method and Description |
---|---|
void |
processPartialMesssage(byte[] message,
int offset)
Processes messages of the MSG_PARTIAL type.
|
private final java.util.concurrent.ExecutorService asynchIOExecutor
private final java.util.Map<java.lang.Integer,java.nio.channels.FileChannel> partialMessages
private final java.util.Map<java.lang.Integer,java.lang.Byte> payloadMessagesTypes
private final java.nio.file.Path tmpDir