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

java.lang.Object
  extended by com.aelitis.net.udp.uc.PRUDPPacket
      extended by com.aelitis.net.udp.uc.PRUDPPacketReply
          extended by com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketReply
All Implemented Interfaces:
DHTUDPPacket
Direct Known Subclasses:
DHTUDPPacketReplyError, DHTUDPPacketReplyFindNode, DHTUDPPacketReplyFindValue, DHTUDPPacketReplyKeyBlock, DHTUDPPacketReplyPing, DHTUDPPacketReplyQueryStorage, DHTUDPPacketReplyStats, DHTUDPPacketReplyStore

public class DHTUDPPacketReply
extends PRUDPPacketReply
implements DHTUDPPacket

Author:
parg

Field Summary
static int DHT_HEADER_SIZE
           
 
Fields inherited from class com.aelitis.net.udp.uc.PRUDPPacketReply
PR_HEADER_SIZE
 
Fields inherited from class com.aelitis.net.udp.uc.PRUDPPacket
DEFAULT_UDP_TIMEOUT, MAX_PACKET_SIZE
 
Constructor Summary
  DHTUDPPacketReply(DHTTransportUDPImpl _transport, int _type, DHTUDPPacketRequest _request, DHTTransportContact _local_contact, DHTTransportContact _remote_contact)
           
protected DHTUDPPacketReply(DHTUDPPacketNetworkHandler network_handler, java.net.InetSocketAddress originator, java.io.DataInputStream is, int type, int trans_id)
           
 
Method Summary
protected  long getClockSkew()
           
 long getConnectionId()
           
 byte getGenericFlags()
           
 byte getGenericFlags2()
           
 int getNetwork()
           
protected  DHTNetworkPosition[] getNetworkPositions()
           
 long getProcessingTime()
           
 byte getProtocolVersion()
           
 java.lang.String getString()
           
protected  int getTargetInstanceID()
           
 DHTTransportUDPImpl getTransport()
           
protected  byte getVendorID()
           
 void serialise(java.io.DataOutputStream os)
           
 void setNetwork(int _network)
           
protected  void setNetworkPositions(DHTNetworkPosition[] _network_positions)
           
 
Methods inherited from class com.aelitis.net.udp.uc.PRUDPPacketReply
deserialiseReply, registerDecoders
 
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

DHT_HEADER_SIZE

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

DHTUDPPacketReply

public DHTUDPPacketReply(DHTTransportUDPImpl _transport,
                         int _type,
                         DHTUDPPacketRequest _request,
                         DHTTransportContact _local_contact,
                         DHTTransportContact _remote_contact)

DHTUDPPacketReply

protected DHTUDPPacketReply(DHTUDPPacketNetworkHandler network_handler,
                            java.net.InetSocketAddress originator,
                            java.io.DataInputStream is,
                            int type,
                            int trans_id)
                     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getTransport

public DHTTransportUDPImpl getTransport()
Specified by:
getTransport in interface DHTUDPPacket

getTargetInstanceID

protected int getTargetInstanceID()

getConnectionId

public long getConnectionId()

getClockSkew

protected long getClockSkew()

getProtocolVersion

public byte getProtocolVersion()
Specified by:
getProtocolVersion in interface DHTUDPPacket

getVendorID

protected byte getVendorID()

getNetwork

public int getNetwork()

getGenericFlags

public byte getGenericFlags()
Specified by:
getGenericFlags in interface DHTUDPPacket

getGenericFlags2

public byte getGenericFlags2()
Specified by:
getGenericFlags2 in interface DHTUDPPacket

setNetwork

public void setNetwork(int _network)

getNetworkPositions

protected DHTNetworkPosition[] getNetworkPositions()

setNetworkPositions

protected void setNetworkPositions(DHTNetworkPosition[] _network_positions)

serialise

public void serialise(java.io.DataOutputStream os)
               throws java.io.IOException
Overrides:
serialise in class PRUDPPacketReply
Throws:
java.io.IOException

getProcessingTime

public long getProcessingTime()

getString

public java.lang.String getString()
Overrides:
getString in class PRUDPPacketReply