public class MessageReader extends Reader implements MessageAppender
Due to the spec, this reader is forced to use the UTF8 charset.
| Constructor and Description |
|---|
MessageReader(AnnotatedEventDriver driver) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendMessage(ByteBuffer payload)
Append the payload to the message.
|
void |
close() |
void |
messageComplete()
Notification that message is to be considered complete.
|
int |
read(char[] cbuf,
int off,
int len) |
public MessageReader(AnnotatedEventDriver driver)
public void appendMessage(ByteBuffer payload) throws IOException
MessageAppenderappendMessage in interface MessageAppenderpayload - the payload to append.IOException - if unable to append the payloadpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic void messageComplete()
MessageAppendermessageComplete in interface MessageAppenderpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionCopyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.