|
|||||||||
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.MessageAdapter
public class MessageAdapter
Field Summary |
---|
Fields inherited from interface org.gudy.azureus2.plugins.messaging.Message |
---|
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD |
Fields inherited from interface com.aelitis.azureus.core.peermanager.messaging.Message |
---|
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD |
Constructor Summary | |
---|---|
MessageAdapter(Message plug_msg)
|
|
MessageAdapter(Message core_msg)
|
Method Summary | |
---|---|
Message |
create(java.nio.ByteBuffer data)
Create a new instance of this message by decoding the given byte serialization. |
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. |
Message |
getCoreMessage()
|
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()
|
java.nio.ByteBuffer[] |
getPayload()
Get message payload data. |
Message |
getPluginMessage()
|
int |
getType()
Get message type. |
byte |
getVersion()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageAdapter(Message plug_msg)
public MessageAdapter(Message core_msg)
Method Detail |
---|
public Message getPluginMessage()
public Message getCoreMessage()
public java.nio.ByteBuffer[] getPayload()
Message
public Message create(java.nio.ByteBuffer data) throws MessageException
Message
data
- to deserialize
MessageException
- if the decoding process failspublic java.lang.String getID()
Message
getID
in interface Message
public byte[] getIDBytes()
getIDBytes
in interface Message
public int getType()
Message
getType
in interface Message
public byte getVersion()
getVersion
in interface Message
public java.lang.String getDescription()
Message
getDescription
in interface Message
public void destroy()
Message
destroy
in interface Message
public java.lang.String getFeatureID()
Message
getFeatureID
in interface Message
public int getFeatureSubID()
Message
getFeatureSubID
in interface Message
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |