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