|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jarol.messages.Message
public abstract class Message
Base class for messages.
Field Summary | |
---|---|
static float |
MAX_FP32
Max value for FP32 type. |
static double |
MAX_FP64
Max value for FP64 type. |
static short |
MAX_INT16
Max value for INT16 type. |
static int |
MAX_INT32
Max value for INT32 type. |
static long |
MAX_INT64
Max value for INT64 type. |
static byte |
MAX_INT8
Max value for INT8 type. |
static int |
MAX_UINT16
Max value for UINT16 type. |
static long |
MAX_UINT32
Max value for UINT32 type. |
static long |
MAX_UINT64
Max value for UINT64 type (not accurate) |
static short |
MAX_UINT8
Max value for UINT8 type. |
static float |
MIN_FP32
Min value for FP32 type. |
static double |
MIN_FP64
Min value for FP64 type. |
static short |
MIN_INT16
Min value for INT16 type. |
static int |
MIN_INT32
Min value for INT32 type. |
static long |
MIN_INT64
Min value for INT64 type. |
static byte |
MIN_INT8
Min value for INT8 type. |
static int |
MIN_UINT16
Min value for UINT16 type. |
static int |
MIN_UINT32
Min value for UINT32 type. |
static long |
MIN_UINT64
Min value for UINT64 type. |
static short |
MIN_UINT8
Min value for UINT8 type. |
static boolean |
MSG_DEBUG
|
Constructor Summary | |
---|---|
Message()
No argument constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
clone() implementation with deep copy semantics. |
java.lang.Object |
deepClone()
deepClone() implementation. |
long |
getSequenceId()
Get sequence id By default this implementation always returns 0. |
double |
getTimestamp()
Get timestamp. |
abstract int |
serialId()
Get serialization id for message. |
abstract void |
serialize(Buffer buffer)
Serialize message. |
abstract int |
serialSize()
Get serialization size for message. |
void |
setSequenceId(long id)
Set sequence id for message. |
void |
setTimestamp(double timestamp)
Set timestamp for message. |
abstract void |
unserialize(Buffer buffer)
Unserialize message. |
abstract void |
validate()
Abstract method to validate messages. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jarol.messages.MessagePart |
---|
dump |
Methods inherited from interface jarol.MessageInterface |
---|
toString |
Field Detail |
---|
public static final short MIN_UINT8
public static final int MIN_UINT16
public static final int MIN_UINT32
public static final long MIN_UINT64
public static final byte MIN_INT8
public static final short MIN_INT16
public static final int MIN_INT32
public static final long MIN_INT64
public static final byte MAX_INT8
public static final short MAX_INT16
public static final int MAX_INT32
public static final long MAX_INT64
public static final short MAX_UINT8
public static final int MAX_UINT16
public static final long MAX_UINT32
public static final long MAX_UINT64
public static final float MIN_FP32
public static final float MAX_FP32
public static final double MIN_FP64
public static final double MAX_FP64
public static final boolean MSG_DEBUG
Constructor Detail |
---|
public Message()
Method Detail |
---|
public double getTimestamp()
public void setTimestamp(double timestamp)
public long getSequenceId()
public void setSequenceId(long id)
public abstract void validate() throws InvalidMessageException
validate
in interface MessagePart
InvalidMessageException
- if the contents of this message part are invalidpublic abstract int serialId()
public abstract int serialSize()
serialSize
in interface MessagePart
public abstract void serialize(Buffer buffer) throws InvalidMessageException
serialize
in interface MessagePart
buffer
- Output buffer
InvalidMessageException
- if the message is not validpublic abstract void unserialize(Buffer buffer) throws InvalidMessageException
unserialize
in interface MessagePart
buffer
- Input buffer
InvalidMessageException
- if the unserialized message is not validpublic final java.lang.Object deepClone()
deepClone
in interface MessageInterface
java.lang.RuntimeException
- if an exception such as CloneNotSupportedException
was raisedpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface MessageInterface
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |