com.aelitis.azureus.core.dht.netcoords
Class DHTNetworkPositionManager
java.lang.Object
com.aelitis.azureus.core.dht.netcoords.DHTNetworkPositionManager
public class DHTNetworkPositionManager
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DHTNetworkPositionManager
public DHTNetworkPositionManager()
initialise
public static void initialise(DHTStorageAdapter adapter)
destroy
public static void destroy(DHTStorageAdapter adapter)
registerProvider
public static DHTNetworkPositionProviderInstance registerProvider(DHTNetworkPositionProvider provider)
unregisterProvider
public static void unregisterProvider(DHTNetworkPositionProvider provider)
getProvider
public static DHTNetworkPositionProvider getProvider(byte type)
getLocalPositions
public static DHTNetworkPosition[] getLocalPositions()
getBestLocalPosition
public static DHTNetworkPosition getBestLocalPosition()
createPositions
public static DHTNetworkPosition[] createPositions(byte[] ID,
boolean is_local)
estimateRTT
public static float estimateRTT(DHTNetworkPosition[] p1s,
DHTNetworkPosition[] p2s)
update
public static void update(DHTNetworkPosition[] local_positions,
byte[] remote_id,
DHTNetworkPosition[] remote_positions,
float rtt)
serialisePosition
public static byte[] serialisePosition(DHTNetworkPosition pos)
throws java.io.IOException
- Throws:
java.io.IOException
deserialisePosition
public static DHTNetworkPosition deserialisePosition(java.net.InetAddress originator,
byte[] bytes)
throws java.io.IOException
- Throws:
java.io.IOException
deserialise
public static DHTNetworkPosition deserialise(java.net.InetAddress originator,
byte position_type,
java.io.DataInputStream is)
throws java.io.IOException
- Throws:
java.io.IOException
addPositionListener
public static void addPositionListener(DHTNetworkPositionListener listener)
removePositionListener
public static void removePositionListener(DHTNetworkPositionListener listener)
addProviderListener
public static void addProviderListener(DHTNetworkPositionProviderListener listener)
removeProviderListener
public static void removeProviderListener(DHTNetworkPositionProviderListener listener)