|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.peermanager.messaging.bittorrent.BTHandshake
public class BTHandshake
BitTorrent handshake message.
Field Summary | |
---|---|
static int |
AZ_RESERVED_MODE
|
static int |
BT_RESERVED_MODE
|
static boolean |
FAST_EXTENSION_ENABLED
|
static int |
LT_RESERVED_MODE
|
static String |
PROTOCOL
|
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 | |
---|---|
BTHandshake(byte[] data_hash,
byte[] peer_id,
int reserved_mode,
byte version)
Used for outgoing handshake message. |
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. |
byte[] |
getDataHash()
|
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()
|
byte[] |
getPeerId()
|
int |
getPriority()
Get the message's queue priority. |
DirectByteBuffer[] |
getRawData()
Get the message's raw data payload. |
byte[] |
getReserved()
|
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. |
static void |
setFastExtensionEnabled(boolean enabled)
|
static void |
setMainlineDHTEnabled(boolean enabled)
|
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 |
Field Detail |
---|
public static final String PROTOCOL
public static final int BT_RESERVED_MODE
public static final int LT_RESERVED_MODE
public static final int AZ_RESERVED_MODE
public static final boolean FAST_EXTENSION_ENABLED
Constructor Detail |
---|
public BTHandshake(byte[] data_hash, byte[] peer_id, int reserved_mode, byte version)
data_hash
- peer_id
- set_reserve_bit
- Method Detail |
---|
public static void setMainlineDHTEnabled(boolean enabled)
public static void setFastExtensionEnabled(boolean enabled)
public byte[] getReserved()
public byte[] getDataHash()
public byte[] getPeerId()
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 byte getVersion()
getVersion
in interface Message
public 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 void destroy()
Message
destroy
in interface Message
public Message getBaseMessage()
RawMessage
getBaseMessage
in interface RawMessage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |