MessageAppenderpublic class MessageInputStream extends java.io.InputStream implements MessageAppender
An InputStream that can access a queue of ByteBuffer payloads, along with expected InputStream blocking behavior.
| Constructor | Description |
|---|---|
MessageInputStream() |
|
MessageInputStream(int timeoutMs) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
appendFrame(java.nio.ByteBuffer framePayload,
boolean fin) |
Append the frame payload to the message.
|
void |
close() |
|
void |
mark(int readlimit) |
|
boolean |
markSupported() |
|
void |
messageComplete() |
Notification that message is to be considered complete.
|
int |
read() |
|
void |
reset() |
public MessageInputStream()
public MessageInputStream(int timeoutMs)
public void appendFrame(java.nio.ByteBuffer framePayload,
boolean fin)
throws java.io.IOException
MessageAppenderappendFrame in interface MessageAppenderframePayload - the frame payload to append.fin - flag indicating if this is the last part of the message or not.java.io.IOException - if unable to append the frame payloadpublic void close()
throws java.io.IOException
close in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStreampublic boolean markSupported()
markSupported in class java.io.InputStreampublic void messageComplete()
MessageAppenderAny cleanup or final actions should be taken here.
messageComplete in interface MessageAppenderpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionCopyright © 1995–2018 Webtide. All rights reserved.