|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.integration.ip.mind.MindRpcSerializer
public class MindRpcSerializer
Spring Serializer and Deserializer interfaces
for mind protocol.
| Field Summary | |
|---|---|
protected int |
maxMessageSize
|
| Constructor Summary | |
|---|---|
MindRpcSerializer()
|
|
| Method Summary | |
|---|---|
protected void |
checkClosure(int bite)
|
MindRpcMessageHolder |
deserialize(InputStream inputStream)
|
protected byte[] |
readBytes(InputStream inputStream,
int length)
Helper method to read bytes from a stream. |
protected int[] |
readHeader(InputStream inputStream)
Reads the first line as a protocol header and parses sizes of underlying headers and content. |
protected Map<String,String> |
readHeaders(InputStream inputStream,
int length)
Reads a message headers from inputstream with a given length. |
void |
serialize(MindRpcMessageHolder object,
OutputStream outputStream)
|
void |
setMaxMessageSize(int maxMessageSize)
Sets the max message size for transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int maxMessageSize
| Constructor Detail |
|---|
public MindRpcSerializer()
| Method Detail |
|---|
public MindRpcMessageHolder deserialize(InputStream inputStream)
throws IOException
deserialize in interface Deserializer<MindRpcMessageHolder>IOExceptionDeserializer.deserialize(java.io.InputStream)
public void serialize(MindRpcMessageHolder object,
OutputStream outputStream)
throws IOException
serialize in interface Serializer<MindRpcMessageHolder>IOExceptionSerializer.serialize(java.lang.Object, java.io.OutputStream)public void setMaxMessageSize(int maxMessageSize)
maxMessageSize - the length of max message
protected int[] readHeader(InputStream inputStream)
throws IOException
inputStream - the input stream
IOException - if read error occured
protected Map<String,String> readHeaders(InputStream inputStream,
int length)
throws IOException
inputStream - the input streamlength - how much to read from a stream
IOException - if error occured
protected byte[] readBytes(InputStream inputStream,
int length)
throws IOException
inputStream - the input streamlength - how much to read
IOException - if error occured
protected void checkClosure(int bite)
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||