|
|||||||||
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(String _id,
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. |
String |
getDescription()
Get textual description of this particular message. |
String |
getFeatureID()
Get the main feature set name this message belongs to. |
int |
getFeatureSubID()
Get the static message sub-id for the feature. |
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(String _id, String _desc, DirectByteBuffer _buffer, boolean _already_encoded)
Method Detail |
---|
protected boolean isAlreadyEncoded()
public String getID()
Message
getID
in interface Message
public byte[] getIDBytes()
getIDBytes
in interface Message
public String getFeatureID()
Message
getFeatureID
in interface Message
public int getFeatureSubID()
Message
getFeatureSubID
in interface Message
public int getType()
Message
getType
in interface Message
public 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 |