|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.ProtocolMessage
A ProtocolMessage is the base class for representing a packet header and payload specific to a single protocol. It may be an element of a linked list of other ProtocolMessages that represent the previous and subsequent headers. If a subsequent ProtocolMessage exists, it represents the payload of this header.
| Constructor Summary | |
ProtocolMessage()
Construct an empty ProtocolMessage. |
|
| Method Summary | |
int |
bytecount()
Return the total size (in bytes) of this header plus the payload, if any. |
void |
carryPayload(ProtocolMessage payload)
Append a ProtocolMessage to this ProtocolMessage. |
ProtocolMessage |
copy()
Return an exact copy of this ProtocolMessage. |
void |
dropHeader()
Discard the header of this ProtocolMessage. |
void |
dropPayload()
Discard the payload of this ProtocolMessage. |
void |
frombytes(byte[] buf,
int offset)
Deserialize this header from the given byte buffer at the given offset. |
static ProtocolMessage |
fromVersion(java.lang.String V)
Return a new instance of the specified ProtocolMessage class. |
int |
header_bytecount()
Return the size (in bytes) of this header only, don't include the payload, if any. |
ProtocolMessage |
payload()
Return the next header. |
ProtocolMessage |
previous()
Return the previous header. |
float |
size()
Return the total number of bytes in the ProtocolMessage. |
void |
tobytes(byte[] buf,
int offset)
Serialize this header into the given byte buffer at the given offset. |
java.lang.String |
version()
Return the name of the class of which this ProtocolMessage is an instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProtocolMessage()
| Method Detail |
public float size()
public java.lang.String version()
public static ProtocolMessage fromVersion(java.lang.String V)
public void dropPayload()
public void dropHeader()
public ProtocolMessage copy()
public void carryPayload(ProtocolMessage payload)
public ProtocolMessage payload()
public ProtocolMessage previous()
public int bytecount()
public int header_bytecount()
public void tobytes(byte[] buf,
int offset)
public void frombytes(byte[] buf,
int offset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||