|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.messaging.GenericMessage
public class GenericMessage
Field Summary |
---|
Fields inherited from interface com.aelitis.azureus.core.peermanager.messaging.Message |
---|
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD |
Constructor Summary | |
---|---|
protected |
GenericMessage(java.lang.String _id,
java.lang.String _desc,
DirectByteBuffer _buffer,
boolean _already_encoded)
|
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()
|
DirectByteBuffer |
getPayload()
|
int |
getType()
Get message type. |
byte |
getVersion()
|
protected boolean |
isAlreadyEncoded()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected GenericMessage(java.lang.String _id, java.lang.String _desc, DirectByteBuffer _buffer, boolean _already_encoded)
Method Detail |
---|
protected boolean isAlreadyEncoded()
public java.lang.String getID()
Message
getID
in interface Message
public byte[] getIDBytes()
getIDBytes
in interface Message
public java.lang.String getFeatureID()
Message
getFeatureID
in interface Message
public int getFeatureSubID()
Message
getFeatureSubID
in interface Message
public int getType()
Message
getType
in interface Message
public java.lang.String getDescription()
Message
getDescription
in interface Message
public byte getVersion()
getVersion
in interface Message
public DirectByteBuffer getPayload()
public DirectByteBuffer[] getData()
Message
getData
in interface Message
public Message deserialize(DirectByteBuffer data, byte version) throws MessageException
Message
deserialize
in interface Message
data
- to deserialize
MessageException
- if the decoding process fails
NOTE: Does not auto-return given direct buffer on thrown exception.public void destroy()
Message
destroy
in interface Message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |