nl.west.aaa
Class JObjectFormat
java.lang.Object
|
+--nl.west.aaa.JObjectFormat
- public class JObjectFormat
- extends java.lang.Object
- implements RecordFormat
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
JObjectFormat
public JObjectFormat()
encodeMessage
public byte[] encodeMessage(Message msg)
- Description copied from interface: RecordFormat
- Encode a given message.
- Specified by:
- encodeMessage in interface RecordFormat
decodeMessage
public Message decodeMessage(java.io.InputStream in,
Identifier from)
throws java.io.IOException
- Read a Message from the InputStream.
The stream should be tested as using the JObjectFormat
record format with checkHeader().
The read message is returned.
If no message is found null is returned.
- Specified by:
- decodeMessage in interface RecordFormat
decodeMessage
public Message decodeMessage(byte[] data,
Identifier from)
- Description copied from interface: RecordFormat
- Read a Message from a byte array.
The data should contain one complete message.
If the data is not a message of this record format,
null should be returned (no exceptions thrown).
Any recordformat should ensure that a "sid" (session id)
attribute is present in the message. This attribute is used
for matching replies with requests.
- Specified by:
- decodeMessage in interface RecordFormat
|