public class LazyMessageBuffer extends java.lang.Object implements MessageBuffer
Constructor and Description |
---|
LazyMessageBuffer(MessageProtocol protocol) |
Modifier and Type | Method and Description |
---|---|
boolean |
addBytes(java.nio.ByteBuffer buffer)
Adds byte data to the message buffer.
|
boolean |
hasMessages()
Returns true if there is a message waiting in the buffer.
|
Message |
pollMessage()
Returns the next message in the buffer or null if there are no more
messages in the buffer.
|
public LazyMessageBuffer(MessageProtocol protocol)
public Message pollMessage()
pollMessage
in interface MessageBuffer
public boolean hasMessages()
hasMessages
in interface MessageBuffer
public boolean addBytes(java.nio.ByteBuffer buffer)
addBytes
in interface MessageBuffer