|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aelitis.azureus.core.networkmanager.impl.RawMessageImpl
public class RawMessageImpl
Basic raw message implementation used internally for Message-->RawMessage conversions.
Field Summary |
---|
Fields inherited from interface com.aelitis.azureus.core.networkmanager.RawMessage |
---|
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL |
Fields inherited from interface com.aelitis.azureus.core.peermanager.messaging.Message |
---|
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD |
Constructor Summary | |
---|---|
RawMessageImpl(Message source,
DirectByteBuffer[] raw_payload,
int _priority,
boolean _is_no_delay,
Message[] _to_remove)
Create a new raw message using the given parameters. |
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. |
Message |
getBaseMessage()
Get the message this raw message is based upon. |
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 |
getPriority()
Get the message's queue priority. |
DirectByteBuffer[] |
getRawData()
Get the message's raw data payload. |
int |
getType()
Get message type. |
byte |
getVersion()
|
boolean |
isNoDelay()
Is this a no-delay message. |
Message[] |
messagesToRemove()
Get the yet-unsent message types that should be removed before queueing this message for sending. |
void |
setNoDelay()
Set no-delay for this message |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RawMessageImpl(Message source, DirectByteBuffer[] raw_payload, int _priority, boolean _is_no_delay, Message[] _to_remove)
source
- original messageraw_payload
- headers + original message datapriority
- in queueis_no_delay
- is an urgent messageto_remove
- message types to auto-remove upon queueMethod Detail |
---|
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 byte getVersion()
getVersion
in interface Message
public java.lang.String getDescription()
Message
getDescription
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.public DirectByteBuffer[] getRawData()
RawMessage
getRawData
in interface RawMessage
public int getPriority()
RawMessage
getPriority
in interface RawMessage
public boolean isNoDelay()
RawMessage
isNoDelay
in interface RawMessage
public void setNoDelay()
RawMessage
setNoDelay
in interface RawMessage
public Message[] messagesToRemove()
RawMessage
messagesToRemove
in interface RawMessage
public Message getBaseMessage()
RawMessage
getBaseMessage
in interface RawMessage
public void destroy()
Message
destroy
in interface Message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |