|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.net.msg.MessageHead
Class containing the message head, which is standard for all message types. A message head can be initialized either upon construction, for subsequent writing to a stream, or when read from a stream.
Field Summary | |
protected java.lang.String |
_bodyVersion
|
protected java.lang.String |
_headVersion
|
protected java.lang.String |
_messageType
|
protected long |
_sourceTime
|
protected long |
_targetTime
|
static java.lang.String |
HEAD_VERSION
Head version: Version of constructed message heads. |
Constructor Summary | |
MessageHead()
Constructs a head that is empty except for the head version. |
|
MessageHead(java.lang.String messageType,
java.lang.String bodyVersion)
Constructs a head that is empty except for the head version, message type, and body version. |
Method Summary | |
protected void |
afterHeadRead()
Called just after the message head is read. |
protected void |
beforeHeadWrite()
Called just before the message head is written. |
java.lang.String |
getBodyVersion()
Gets the version for the message body data format. |
java.lang.String |
getHeadVersion()
Gets the version for the message head data format. |
java.lang.String |
getMessageType()
Gets the type of this message, which is its fully qualified java class name. |
long |
getSourceTime()
Gets the time at which the source started writing the message head, expressed in milliseconds since January 1, 1970, 0:00:00 GMT. |
long |
getTargetTime()
Gets the time at which the target finished reading the message head, expressed in milliseconds since January 1, 1970, 0:00:00 GMT. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String HEAD_VERSION
protected transient long _targetTime
protected java.lang.String _headVersion
protected java.lang.String _messageType
protected long _sourceTime
protected java.lang.String _bodyVersion
Constructor Detail |
public MessageHead()
public MessageHead(java.lang.String messageType, java.lang.String bodyVersion)
messageType
- Fully qualified java class name of the message.
Never null.bodyVersion
- Message body version. Never null.Method Detail |
public java.lang.String getMessageType()
public java.lang.String getBodyVersion()
public java.lang.String getHeadVersion()
public long getSourceTime()
public long getTargetTime()
protected void afterHeadRead()
protected void beforeHeadWrite()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |