Class PeerItemFactory
java.lang.Object
com.biglybt.core.peermanager.peerdb.PeerItemFactory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PeerItemcreatePeerItem(byte[] serialization, byte source, byte handshake_type, int udp_port, String network) Create a peer item using the given peer raw byte serialization (address and port).static PeerItemcreatePeerItem(String address, int tcp_port, byte source, byte handshake_type, int udp_port, byte crypto_level, int up_speed) Create a peer item using the given peer address and port information.static PeerDescriptorgetDescriptor(PEPeer peer) static PeerDescriptorgetDescriptor(Peer peer) static void
-
Field Details
-
PEER_SOURCE_TRACKER
public static final byte PEER_SOURCE_TRACKER- See Also:
-
PEER_SOURCE_DHT
public static final byte PEER_SOURCE_DHT- See Also:
-
PEER_SOURCE_PEER_EXCHANGE
public static final byte PEER_SOURCE_PEER_EXCHANGE- See Also:
-
PEER_SOURCE_PLUGIN
public static final byte PEER_SOURCE_PLUGIN- See Also:
-
PEER_SOURCE_INCOMING
public static final byte PEER_SOURCE_INCOMING- See Also:
-
PEER_SOURCE_HOLE_PUNCH
public static final byte PEER_SOURCE_HOLE_PUNCH- See Also:
-
HANDSHAKE_TYPE_PLAIN
public static final byte HANDSHAKE_TYPE_PLAIN- See Also:
-
HANDSHAKE_TYPE_CRYPTO
public static final byte HANDSHAKE_TYPE_CRYPTO- See Also:
-
CRYPTO_LEVEL_1
public static final byte CRYPTO_LEVEL_1- See Also:
-
CRYPTO_LEVEL_2
public static final byte CRYPTO_LEVEL_2- See Also:
-
CRYPTO_LEVEL_CURRENT
public static final byte CRYPTO_LEVEL_CURRENT- See Also:
-
-
Constructor Details
-
PeerItemFactory
public PeerItemFactory()
-
-
Method Details
-
initialise
public static void initialise() -
createPeerItem
public static PeerItem createPeerItem(String address, int tcp_port, byte source, byte handshake_type, int udp_port, byte crypto_level, int up_speed) Create a peer item using the given peer address and port information.- Parameters:
address- of peersource- this peer info was obtained fromport- of peer- Returns:
- peer
-
createPeerItem
public static PeerItem createPeerItem(byte[] serialization, byte source, byte handshake_type, int udp_port, String network) throws Exception Create a peer item using the given peer raw byte serialization (address and port).- Parameters:
serialization- bytessource- this peer info was obtained from- Returns:
- peer
- Throws:
Exception
-
getDescriptor
-
getDescriptor
-