|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Message
Basic peer message. A message is uniquely identified by the combination of ID and version.
Field Summary | |
---|---|
static int |
TYPE_DATA_PAYLOAD
Is a data-bearing message, i.e. |
static int |
TYPE_PROTOCOL_PAYLOAD
Is a protocol-bearing message, i.e. |
Method Summary | |
---|---|
Message |
deserialize(DirectByteBuffer data,
byte version)
Create a new instance of this message by decoding the given byte serialization. |
void |
destroy()
Destroy the message; i.e. |
DirectByteBuffer[] |
getData()
Get message payload data. |
java.lang.String |
getDescription()
Get textual description of this particular message. |
java.lang.String |
getFeatureID()
Get the main feature set name this message belongs to. |
int |
getFeatureSubID()
Get the static message sub-id for the feature. |
java.lang.String |
getID()
Get message id. |
byte[] |
getIDBytes()
|
int |
getType()
Get message type. |
byte |
getVersion()
|
Field Detail |
---|
static final int TYPE_PROTOCOL_PAYLOAD
static final int TYPE_DATA_PAYLOAD
Method Detail |
---|
java.lang.String getID()
byte[] getIDBytes()
java.lang.String getFeatureID()
int getFeatureSubID()
byte getVersion()
int getType()
java.lang.String getDescription()
DirectByteBuffer[] getData()
Message deserialize(DirectByteBuffer data, byte version) throws MessageException
data
- to deserialize
MessageException
- if the decoding process fails
NOTE: Does not auto-return given direct buffer on thrown exception.void destroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |