Class RawMessageAdapter
- java.lang.Object
-
- com.biglybt.pifimpl.local.messaging.MessageAdapter
-
- com.biglybt.pifimpl.local.network.RawMessageAdapter
-
- All Implemented Interfaces:
RawMessage
,Message
,Message
,RawMessage
public class RawMessageAdapter extends MessageAdapter implements RawMessage, RawMessage
-
-
Field Summary
Fields Modifier and Type Field Description private RawMessage
core_msg
private RawMessage
plug_msg
-
Fields inherited from interface com.biglybt.core.peermanager.messaging.Message
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD
-
Fields inherited from interface com.biglybt.pif.messaging.Message
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD
-
Fields inherited from interface com.biglybt.core.networkmanager.RawMessage
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL
-
-
Constructor Summary
Constructors Constructor Description RawMessageAdapter(RawMessage core_msg)
RawMessageAdapter(RawMessage plug_msg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Message
getBaseMessage()
Get the message this raw message is based upon.Message
getOriginalMessage()
Get the message this raw message is based upon.int
getPriority()
Get the message's queue priority.DirectByteBuffer[]
getRawData()
Get the message's raw data payload.java.nio.ByteBuffer[]
getRawPayload()
Get the raw data payload for this message.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 com.biglybt.pifimpl.local.messaging.MessageAdapter
create, deserialize, destroy, getCoreMessage, getData, getDescription, getFeatureID, getFeatureSubID, getID, getIDBytes, getPayload, getPluginMessage, getType, getVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.core.peermanager.messaging.Message
deserialize, destroy, getData, getDescription, getFeatureID, getFeatureSubID, getID, getIDBytes, getType, getVersion
-
Methods inherited from interface com.biglybt.pif.messaging.Message
create, destroy, getDescription, getID, getPayload, getType
-
-
-
-
Field Detail
-
plug_msg
private RawMessage plug_msg
-
core_msg
private RawMessage core_msg
-
-
Constructor Detail
-
RawMessageAdapter
public RawMessageAdapter(RawMessage plug_msg)
-
RawMessageAdapter
public RawMessageAdapter(RawMessage core_msg)
-
-
Method Detail
-
getRawPayload
public java.nio.ByteBuffer[] getRawPayload()
Description copied from interface:RawMessage
Get the raw data payload for this message.- Specified by:
getRawPayload
in interfaceRawMessage
- Returns:
- raw payload
-
getRawData
public DirectByteBuffer[] getRawData()
Description copied from interface:RawMessage
Get the message's raw data payload.- Specified by:
getRawData
in interfaceRawMessage
- Returns:
- data payload buffers
-
getPriority
public int getPriority()
Description copied from interface:RawMessage
Get the message's queue priority.- Specified by:
getPriority
in interfaceRawMessage
- Returns:
- priority
-
isNoDelay
public boolean isNoDelay()
Description copied from interface:RawMessage
Is this a no-delay message. No-delay messages are transmitted immediately, i.e. force-flushed out the transport.- Specified by:
isNoDelay
in interfaceRawMessage
- Returns:
- true if a no-delay message
-
setNoDelay
public void setNoDelay()
Description copied from interface:RawMessage
Set no-delay for this message- Specified by:
setNoDelay
in interfaceRawMessage
-
messagesToRemove
public Message[] messagesToRemove()
Description copied from interface:RawMessage
Get the yet-unsent message types that should be removed before queueing this message for sending.- Specified by:
messagesToRemove
in interfaceRawMessage
- Returns:
- message types; null if no types
-
getOriginalMessage
public Message getOriginalMessage()
Description copied from interface:RawMessage
Get the message this raw message is based upon.- Specified by:
getOriginalMessage
in interfaceRawMessage
- Returns:
- original message
-
getBaseMessage
public Message getBaseMessage()
Description copied from interface:RawMessage
Get the message this raw message is based upon.- Specified by:
getBaseMessage
in interfaceRawMessage
- Returns:
- original message
-
-