Class DHTTransportAlternativeContactImpl
- java.lang.Object
-
- com.biglybt.core.dht.transport.udp.impl.DHTTransportAlternativeContactImpl
-
- All Implemented Interfaces:
DHTTransportAlternativeContact
public class DHTTransportAlternativeContactImpl extends java.lang.Object implements DHTTransportAlternativeContact
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
encoded
private int
id
private short
initial_age
private byte
network_type
private int
start_time
private byte
version
-
Constructor Summary
Constructors Modifier Constructor Description protected
DHTTransportAlternativeContactImpl(byte _network_type, byte _version, short _age, byte[] _encoded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAge()
Gets the contact's age since last known to be alive in secondsint
getID()
A good-enough ID to spot duplicates - must be equal to Arrays.hashCode( BEncode( getProperties()));int
getLastAlive()
int
getNetworkType()
java.util.Map<java.lang.String,java.lang.Object>
getProperties()
int
getVersion()
-
-
-
Method Detail
-
getNetworkType
public int getNetworkType()
- Specified by:
getNetworkType
in interfaceDHTTransportAlternativeContact
-
getVersion
public int getVersion()
- Specified by:
getVersion
in interfaceDHTTransportAlternativeContact
-
getID
public int getID()
Description copied from interface:DHTTransportAlternativeContact
A good-enough ID to spot duplicates - must be equal to Arrays.hashCode( BEncode( getProperties()));- Specified by:
getID
in interfaceDHTTransportAlternativeContact
- Returns:
-
getLastAlive
public int getLastAlive()
- Specified by:
getLastAlive
in interfaceDHTTransportAlternativeContact
- Returns:
-
getAge
public int getAge()
Description copied from interface:DHTTransportAlternativeContact
Gets the contact's age since last known to be alive in seconds- Specified by:
getAge
in interfaceDHTTransportAlternativeContact
- Returns:
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
- Specified by:
getProperties
in interfaceDHTTransportAlternativeContact
-
-