public class JSONProtocolParser extends java.lang.Object implements ProtocolParser
Constructor and Description |
---|
JSONProtocolParser(JSONProtocol messageType)
Initializes a new instance of the JSONProtocolParser class with
the specified JSONProtocol.
|
Modifier and Type | Method and Description |
---|---|
void |
process(java.nio.ByteBuffer buffer,
int remainingBytes,
MessageHandler listener)
Processes the incoming byte buffer containing JSON messages.
|
public JSONProtocolParser(JSONProtocol messageType)
messageType
- The JSONProtocol instance.public void process(java.nio.ByteBuffer buffer, int remainingBytes, MessageHandler listener) throws StreamException
process
in interface ProtocolParser
buffer
- The byte buffer containing JSON messages.remainingBytes
- The number of remaining bytes in the buffer.listener
- The message handler responsible for processing parsed messages.StreamException
- Thrown when the buffer contains corrupt data or data that is in an invalid format.