public class SocketMessageStreamWriter extends java.lang.Object implements MessageStreamWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
SocketMessageStreamWriter.BufferedStream |
static interface |
SocketMessageStreamWriter.Out |
| Constructor and Description |
|---|
SocketMessageStreamWriter(ClosableOutputStream socket,
java.nio.charset.Charset charset,
ObjectByteWriter writer) |
SocketMessageStreamWriter(SocketMessageStreamWriter.Out socket,
java.nio.charset.Charset charset,
ObjectByteWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
setPositionAndFlush(int position) |
boolean |
tryClose() |
void |
write(java.lang.String topic,
java.lang.Object msg) |
void |
writeByteAsInt(int byteToWrite) |
void |
writeBytes(byte[] bytes) |
void |
writeIntoBuffer(java.lang.String topic,
java.lang.Object req) |
void |
writeReply(int reqId,
java.lang.String requestTopic,
java.lang.Object replyMsg) |
void |
writeRequest(int id,
java.lang.String reqTopic,
java.lang.Object req) |
void |
writeSubscription(int msgType,
java.lang.String subject,
java.nio.charset.Charset charset) |
int |
writeWithoutFlush(java.lang.String topic,
java.lang.Object msg) |
public SocketMessageStreamWriter(SocketMessageStreamWriter.Out socket, java.nio.charset.Charset charset, ObjectByteWriter writer)
public SocketMessageStreamWriter(ClosableOutputStream socket, java.nio.charset.Charset charset, ObjectByteWriter writer) throws java.io.IOException
java.io.IOExceptionpublic void writeByteAsInt(int byteToWrite)
throws java.io.IOException
writeByteAsInt in interface MessageStreamWriterjava.io.IOExceptionpublic void writeSubscription(int msgType,
java.lang.String subject,
java.nio.charset.Charset charset)
throws java.io.IOException
writeSubscription in interface MessageStreamWriterjava.io.IOExceptionpublic boolean tryClose()
tryClose in interface MessageStreamWriterpublic void write(java.lang.String topic,
java.lang.Object msg)
throws java.io.IOException
write in interface MessageStreamWriterjava.io.IOExceptionpublic int writeWithoutFlush(java.lang.String topic,
java.lang.Object msg)
throws java.io.IOException
java.io.IOExceptionpublic void setPositionAndFlush(int position)
throws java.io.IOException
java.io.IOExceptionpublic void writeRequest(int id,
java.lang.String reqTopic,
java.lang.Object req)
throws java.io.IOException
writeRequest in interface MessageStreamWriterjava.io.IOExceptionpublic void writeReply(int reqId,
java.lang.String requestTopic,
java.lang.Object replyMsg)
throws java.io.IOException
writeReply in interface MessageStreamWriterjava.io.IOExceptionpublic void writeIntoBuffer(java.lang.String topic,
java.lang.Object req)
throws java.io.IOException
java.io.IOExceptionpublic void writeBytes(byte[] bytes)
throws java.io.IOException
writeBytes in interface MessageStreamWriterjava.io.IOExceptionCopyright © 2018. All Rights Reserved.