com.aelitis.azureus.core.dht.transport.udp.impl
Class DHTUDPPacketData

java.lang.Object
  extended by com.aelitis.net.udp.uc.PRUDPPacket
      extended by com.aelitis.net.udp.uc.PRUDPPacketRequest
          extended by com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest
              extended by com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketData
All Implemented Interfaces:
DHTUDPPacket

public class DHTUDPPacketData
extends DHTUDPPacketRequest

Author:
parg

Field Summary
static int MAX_DATA_SIZE
           
static byte PT_READ_REPLY
           
static byte PT_READ_REQUEST
           
static byte PT_WRITE_REPLY
           
static byte PT_WRITE_REQUEST
           
 
Fields inherited from class com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest
DHT_HEADER_SIZE
 
Fields inherited from class com.aelitis.net.udp.uc.PRUDPPacketRequest
PR_HEADER_SIZE
 
Fields inherited from class com.aelitis.net.udp.uc.PRUDPPacket
DEFAULT_UDP_TIMEOUT, MAX_PACKET_SIZE
 
Constructor Summary
  DHTUDPPacketData(DHTTransportUDPImpl _transport, long _connection_id, DHTTransportUDPContactImpl _local_contact, DHTTransportUDPContactImpl _remote_contact)
           
protected DHTUDPPacketData(DHTUDPPacketNetworkHandler network_handler, DataInputStream is, long con_id, int trans_id)
           
 
Method Summary
 byte[] getData()
           
 int getLength()
           
 byte getPacketType()
           
 byte[] getRequestKey()
           
 int getStartPosition()
           
 String getString()
           
 int getTotalLength()
           
 byte[] getTransferKey()
           
 void serialise(DataOutputStream os)
           
 void setDetails(byte _packet_type, byte[] _transfer_key, byte[] _key, byte[] _data, int _start_pos, int _length, int _total_length)
           
 
Methods inherited from class com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest
getClockSkew, getGenericFlags, getGenericFlags2, getNetwork, getOriginatorAddress, getOriginatorInstanceID, getOriginatorVersion, getProtocolVersion, getTransport, getVendorID, postDeserialise, postSerialise, setNetwork, setOriginatorAddress
 
Methods inherited from class com.aelitis.net.udp.uc.PRUDPPacketRequest
deserialiseRequest, getConnectionId, getReceiveTime, registerDecoders, setReceiveTime
 
Methods inherited from class com.aelitis.net.udp.uc.PRUDPPacket
getAction, getAddress, getPreviousPacket, getSerialisedSize, getTransactionId, hasContinuation, setAddress, setPreviousPacket, setSerialisedSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PT_READ_REQUEST

public static final byte PT_READ_REQUEST
See Also:
Constant Field Values

PT_READ_REPLY

public static final byte PT_READ_REPLY
See Also:
Constant Field Values

PT_WRITE_REQUEST

public static final byte PT_WRITE_REQUEST
See Also:
Constant Field Values

PT_WRITE_REPLY

public static final byte PT_WRITE_REPLY
See Also:
Constant Field Values

MAX_DATA_SIZE

public static final int MAX_DATA_SIZE
See Also:
Constant Field Values
Constructor Detail

DHTUDPPacketData

public DHTUDPPacketData(DHTTransportUDPImpl _transport,
                        long _connection_id,
                        DHTTransportUDPContactImpl _local_contact,
                        DHTTransportUDPContactImpl _remote_contact)

DHTUDPPacketData

protected DHTUDPPacketData(DHTUDPPacketNetworkHandler network_handler,
                           DataInputStream is,
                           long con_id,
                           int trans_id)
                    throws IOException
Throws:
IOException
Method Detail

serialise

public void serialise(DataOutputStream os)
               throws IOException
Overrides:
serialise in class DHTUDPPacketRequest
Throws:
IOException

setDetails

public void setDetails(byte _packet_type,
                       byte[] _transfer_key,
                       byte[] _key,
                       byte[] _data,
                       int _start_pos,
                       int _length,
                       int _total_length)

getPacketType

public byte getPacketType()

getTransferKey

public byte[] getTransferKey()

getRequestKey

public byte[] getRequestKey()

getData

public byte[] getData()

getStartPosition

public int getStartPosition()

getLength

public int getLength()

getTotalLength

public int getTotalLength()

getString

public String getString()
Overrides:
getString in class DHTUDPPacketRequest