|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.core3.peer.util.PeerIdentityManager
public class PeerIdentityManager
Maintains peer identity information.
Nested Class Summary | |
---|---|
protected static class |
PeerIdentityManager.DataEntry
|
Constructor Summary | |
---|---|
PeerIdentityManager()
|
Method Summary | |
---|---|
static boolean |
addIdentity(PeerIdentityDataID data_id,
byte[] peer_id,
int local_port,
java.lang.String ip)
Add a new peer identity to the manager. |
static boolean |
containsIdentity(PeerIdentityDataID data_id,
byte[] peer_id,
int local_port)
Check if the manager already has the given peer identity. |
static boolean |
containsIPAddress(PeerIdentityDataID data_id,
java.lang.String ip)
Check if the given IP address is already present in the manager's peer identity list for the given data item (i.e. |
static PeerIdentityDataID |
createDataID(byte[] data)
|
static int |
getIdentityCount(PeerIdentityDataID data_id)
Get the total number of peer identities managed for the given data item. |
static int |
getTotalIdentityCount()
Get the total number of peer identities managed. |
static void |
removeIdentity(PeerIdentityDataID data_id,
byte[] peer_id,
int local_port)
Remove a peer identity from the manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeerIdentityManager()
Method Detail |
---|
public static PeerIdentityDataID createDataID(byte[] data)
public static boolean addIdentity(PeerIdentityDataID data_id, byte[] peer_id, int local_port, java.lang.String ip)
data_id
- unique id for the data item associated with this connectionpeer_id
- unique id for this peer connectionip
- remote peer's ip addresspublic static void removeIdentity(PeerIdentityDataID data_id, byte[] peer_id, int local_port)
data_id
- id for the data item associated with this connectionpeer_id
- id for this peer connectionpublic static boolean containsIdentity(PeerIdentityDataID data_id, byte[] peer_id, int local_port)
data_id
- id for the data item associated with this connectionpeer_id
- id for this peer connection
public static int getTotalIdentityCount()
public static int getIdentityCount(PeerIdentityDataID data_id)
data_id
- data item to count over
public static boolean containsIPAddress(PeerIdentityDataID data_id, java.lang.String ip)
data_id
- id for the data item associated with this connectionip
- IP address to check for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |