|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjarol.messages.SerializationHandle
public class SerializationHandle
Application parameterisation for message factories and serialization.
This class can used to parameterize the serialization done through MessageFactory. it can be
- The timestamp counter method to apply in message headers, if any
- The sequence id counter to apply to message headers, if any
- The checksum method to apply to message footers if any
This base default implementation always returns 0 for all of the above calculations and should be overriden as needed.
All values returned are 'long' values but they may be converted to 'byte', 'short' or 'int' values according to the characteristics of a particular message set. The implementation of the methods should therefore take that into consideration.
Constructor Summary | |
---|---|
SerializationHandle()
Constructor. |
Method Summary | |
---|---|
long |
checksum(byte[] buf,
int off,
int len)
Checksum method. |
long |
nextSequenceId(Message msg)
Sequence id counter method. |
double |
timestamp()
Timestamp method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerializationHandle()
Method Detail |
---|
public double timestamp()
public long nextSequenceId(Message msg)
msg
- message argument
public long checksum(byte[] buf, int off, int len)
buf
- the source buffer for calculating the checksumoff
- the buffer offset for checksum calculationlen
- the number of bytes to consider for checksum
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |