public class XMLProtocolParser extends java.lang.Object implements ProtocolParser
| Constructor and Description |
|---|
XMLProtocolParser(XMLProtocol messageType) |
| Modifier and Type | Method and Description |
|---|---|
void |
process(java.nio.ByteBuffer buffer,
int remainingBytes,
MessageHandler listener)
Processes a region of a byte buffer into messages of a specific protocol and then invokes the specified message
handler for each message parsed from the bytes.
|
public XMLProtocolParser(XMLProtocol messageType)
public void process(java.nio.ByteBuffer buffer,
int remainingBytes,
MessageHandler listener)
throws StreamException
ProtocolParserprocess in interface ProtocolParserbuffer - The byte buffer to be processed.remainingBytes - The length of the byte buffer.listener - The message handler invoked for each message.StreamException - Thrown when the buffer contains corrupt data or data that is in an invalid format.