Class PeerItemFactory
- java.lang.Object
-
- com.biglybt.core.peermanager.peerdb.PeerItemFactory
-
public class PeerItemFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static byte
CRYPTO_LEVEL_1
static byte
CRYPTO_LEVEL_2
static byte
CRYPTO_LEVEL_CURRENT
static byte
HANDSHAKE_TYPE_CRYPTO
static byte
HANDSHAKE_TYPE_PLAIN
static byte
PEER_SOURCE_DHT
static byte
PEER_SOURCE_INCOMING
static byte
PEER_SOURCE_PEER_EXCHANGE
static byte
PEER_SOURCE_PLUGIN
static byte
PEER_SOURCE_TRACKER
-
Constructor Summary
Constructors Constructor Description PeerItemFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PeerItem
createPeerItem(byte[] serialization, byte source, byte handshake_type, int udp_port, java.lang.String network)
Create a peer item using the given peer raw byte serialization (address and port).static PeerItem
createPeerItem(java.lang.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.
-
-
-
Field Detail
-
PEER_SOURCE_TRACKER
public static final byte PEER_SOURCE_TRACKER
- See Also:
- Constant Field Values
-
PEER_SOURCE_DHT
public static final byte PEER_SOURCE_DHT
- See Also:
- Constant Field Values
-
PEER_SOURCE_PEER_EXCHANGE
public static final byte PEER_SOURCE_PEER_EXCHANGE
- See Also:
- Constant Field Values
-
PEER_SOURCE_PLUGIN
public static final byte PEER_SOURCE_PLUGIN
- See Also:
- Constant Field Values
-
PEER_SOURCE_INCOMING
public static final byte PEER_SOURCE_INCOMING
- See Also:
- Constant Field Values
-
HANDSHAKE_TYPE_PLAIN
public static final byte HANDSHAKE_TYPE_PLAIN
- See Also:
- Constant Field Values
-
HANDSHAKE_TYPE_CRYPTO
public static final byte HANDSHAKE_TYPE_CRYPTO
- See Also:
- Constant Field Values
-
CRYPTO_LEVEL_1
public static final byte CRYPTO_LEVEL_1
- See Also:
- Constant Field Values
-
CRYPTO_LEVEL_2
public static final byte CRYPTO_LEVEL_2
- See Also:
- Constant Field Values
-
CRYPTO_LEVEL_CURRENT
public static final byte CRYPTO_LEVEL_CURRENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
createPeerItem
public static PeerItem createPeerItem(java.lang.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 peerport
- of peersource
- this peer info was obtained from- Returns:
- peer
-
createPeerItem
public static PeerItem createPeerItem(byte[] serialization, byte source, byte handshake_type, int udp_port, java.lang.String network) throws java.lang.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:
java.lang.Exception
-
-