Package com.biglybt.core.peermanager
Class PeerManager.PeerManagerRegistrationImpl
java.lang.Object
com.biglybt.core.peermanager.PeerManager.PeerManagerRegistrationImpl
- All Implemented Interfaces:
PeerManagerRegistration
- Enclosing class:
- PeerManager
private class PeerManager.PeerManagerRegistrationImpl
extends Object
implements PeerManagerRegistration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PEPeerControl
private final PeerManagerRegistrationAdapter
private PEPeerControl
private final HashWrapper
private BloomFilter
private Map<String,
TOTorrentFile> private final PeerManager.PeerManagerRegistrationImpl.ProbeControl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PeerManagerRegistrationImpl
(HashWrapper _hash, PeerManagerRegistrationAdapter _adapter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(PEPeerControl _active_control) void
addLink
(String link, TOTorrentFile target) void
protected PEPeerControl
protected PeerManagerRegistrationAdapter
protected byte[]
getHash()
int
getHashOverrideLocalPort
(boolean only_if_allocated) boolean
isActive()
protected boolean
isKnownSeed
(InetSocketAddress address) void
removeLink
(String link) void
route
(NetworkConnection connection, PeerManagerRoutingListener listener) protected void
route
(PEPeerControl control, NetworkConnection connection, boolean is_activation, PeerManagerRoutingListener listener) protected void
setKnownSeed
(InetSocketAddress address) protected boolean
void
-
Field Details
-
hash
-
adapter
-
probe_control
-
download
-
active_control
-
pending_connections
-
known_seeds
-
links
-
-
Constructor Details
-
PeerManagerRegistrationImpl
-
-
Method Details
-
getAdapter
-
getHash
protected byte[] getHash() -
getHashOverrideLocalPort
public int getHashOverrideLocalPort(boolean only_if_allocated) - Specified by:
getHashOverrideLocalPort
in interfacePeerManagerRegistration
-
getOtherRegistrationsForHash
- Specified by:
getOtherRegistrationsForHash
in interfacePeerManagerRegistration
-
getLink
- Specified by:
getLink
in interfacePeerManagerRegistration
-
addLink
- Specified by:
addLink
in interfacePeerManagerRegistration
- Throws:
Exception
-
removeLink
- Specified by:
removeLink
in interfacePeerManagerRegistration
-
isActive
public boolean isActive() -
activate
- Specified by:
activate
in interfacePeerManagerRegistration
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfacePeerManagerRegistration
-
unregister
public void unregister()- Specified by:
unregister
in interfacePeerManagerRegistration
-
isKnownSeed
-
setKnownSeed
-
getActiveControl
-
route
- Specified by:
route
in interfacePeerManagerRegistration
-
timeoutCheck
protected boolean timeoutCheck() -
route
protected void route(PEPeerControl control, NetworkConnection connection, boolean is_activation, PeerManagerRoutingListener listener)
-