Package com.biglybt.core.lws
Class LWSPeerManagerAdapter
java.lang.Object
com.biglybt.core.logging.LogRelation
com.biglybt.core.lws.LWSPeerManagerAdapter
- All Implemented Interfaces:
PEPeerManagerAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]
private final LightWeightSeed
private WeakReference
<byte[]> private int
private final PeerManagerRegistration
-
Constructor Summary
ConstructorsConstructorDescriptionLWSPeerManagerAdapter
(LightWeightSeed _lws, PeerManagerRegistration _peer_manager_registration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHTTPSeed
(String address, int port) void
void
void
dataBytesReceived
(PEPeer peer, int bytes) void
dataBytesSent
(PEPeer peer, int bytes) void
void
enqueueReadRequest
(PEPeer peer, DiskManagerReadRequest request, DiskManagerReadRequestListener listener) int
See NetworkManager.CRYPTO_OVERRIDE constantsint
int
String[]
int
int[]
int[]
int
int
int
int
Object[]
Query this class for a reference to another class that it may holdlong
A short description of what your class holds that can be printed by the loggerbyte[][]
getSecrets
(int crypto_level) byte[]
int
byte[]
getTorrentInfoDict
(PEPeer peer) int
int
int
boolean
boolean
boolean
boolean
isNetworkEnabled
(String network) boolean
boolean
isPeerSourceEnabled
(String peer_source) boolean
void
permittedReceiveBytesUsed
(int bytes) void
permittedSendBytesUsed
(int bytes) void
priorityConnectionChanged
(boolean added) void
protocolBytesReceived
(PEPeer peer, int bytes) void
protocolBytesSent
(PEPeer peer, int bytes) void
removePeer
(PEPeer peer) void
removePiece
(PEPiece piece) void
restartDownload
(boolean recheck) void
void
void
void
setStateSeeding
(boolean never_downloaded) void
setTrackerRefreshDelayOverrides
(int percent) void
void
statsRequest
(PEPeer originator, Map request, Map reply) Methods inherited from class com.biglybt.core.logging.LogRelation
propogatedRelationText, queryForClass
-
Field Details
-
lws
-
peer_manager_registration
-
enabled_networks
-
md_info_dict_size
private int md_info_dict_size -
md_info_dict_ref
-
-
Constructor Details
-
LWSPeerManagerAdapter
public LWSPeerManagerAdapter(LightWeightSeed _lws, PeerManagerRegistration _peer_manager_registration)
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayName
in interfacePEPeerManagerAdapter
-
getTargetHash
public byte[] getTargetHash()- Specified by:
getTargetHash
in interfacePEPeerManagerAdapter
-
getTCPListeningPortNumber
public int getTCPListeningPortNumber()- Specified by:
getTCPListeningPortNumber
in interfacePEPeerManagerAdapter
-
getPeerManagerRegistration
- Specified by:
getPeerManagerRegistration
in interfacePEPeerManagerAdapter
-
getEffectiveUploadRateLimitBytesPerSecond
public int getEffectiveUploadRateLimitBytesPerSecond()- Specified by:
getEffectiveUploadRateLimitBytesPerSecond
in interfacePEPeerManagerAdapter
-
getUploadRateLimitBytesPerSecond
public int getUploadRateLimitBytesPerSecond()- Specified by:
getUploadRateLimitBytesPerSecond
in interfacePEPeerManagerAdapter
-
setUploadRateLimitBytesPerSecond
public void setUploadRateLimitBytesPerSecond(int b) - Specified by:
setUploadRateLimitBytesPerSecond
in interfacePEPeerManagerAdapter
-
getDownloadRateLimitBytesPerSecond
public int getDownloadRateLimitBytesPerSecond()- Specified by:
getDownloadRateLimitBytesPerSecond
in interfacePEPeerManagerAdapter
-
setDownloadRateLimitBytesPerSecond
public void setDownloadRateLimitBytesPerSecond(int b) - Specified by:
setDownloadRateLimitBytesPerSecond
in interfacePEPeerManagerAdapter
-
getPermittedBytesToReceive
public int getPermittedBytesToReceive()- Specified by:
getPermittedBytesToReceive
in interfacePEPeerManagerAdapter
-
permittedReceiveBytesUsed
public void permittedReceiveBytesUsed(int bytes) - Specified by:
permittedReceiveBytesUsed
in interfacePEPeerManagerAdapter
-
getPermittedBytesToSend
public int getPermittedBytesToSend()- Specified by:
getPermittedBytesToSend
in interfacePEPeerManagerAdapter
-
permittedSendBytesUsed
public void permittedSendBytesUsed(int bytes) - Specified by:
permittedSendBytesUsed
in interfacePEPeerManagerAdapter
-
getUploadPriority
public int getUploadPriority()- Specified by:
getUploadPriority
in interfacePEPeerManagerAdapter
-
getMaxUploads
public int getMaxUploads()- Specified by:
getMaxUploads
in interfacePEPeerManagerAdapter
-
getMaxConnections
public int[] getMaxConnections()- Specified by:
getMaxConnections
in interfacePEPeerManagerAdapter
-
getMaxSeedConnections
public int[] getMaxSeedConnections()- Specified by:
getMaxSeedConnections
in interfacePEPeerManagerAdapter
-
getExtendedMessagingMode
public int getExtendedMessagingMode()- Specified by:
getExtendedMessagingMode
in interfacePEPeerManagerAdapter
-
isPeerExchangeEnabled
public boolean isPeerExchangeEnabled()- Specified by:
isPeerExchangeEnabled
in interfacePEPeerManagerAdapter
-
isNetworkEnabled
- Specified by:
isNetworkEnabled
in interfacePEPeerManagerAdapter
-
getEnabledNetworks
- Specified by:
getEnabledNetworks
in interfacePEPeerManagerAdapter
-
getCryptoLevel
public int getCryptoLevel()Description copied from interface:PEPeerManagerAdapter
See NetworkManager.CRYPTO_OVERRIDE constants- Specified by:
getCryptoLevel
in interfacePEPeerManagerAdapter
- Returns:
-
getRandomSeed
public long getRandomSeed()- Specified by:
getRandomSeed
in interfacePEPeerManagerAdapter
-
isPeriodicRescanEnabled
public boolean isPeriodicRescanEnabled()- Specified by:
isPeriodicRescanEnabled
in interfacePEPeerManagerAdapter
-
setStateFinishing
public void setStateFinishing()- Specified by:
setStateFinishing
in interfacePEPeerManagerAdapter
-
setStateSeeding
public void setStateSeeding(boolean never_downloaded) - Specified by:
setStateSeeding
in interfacePEPeerManagerAdapter
-
restartDownload
public void restartDownload(boolean recheck) - Specified by:
restartDownload
in interfacePEPeerManagerAdapter
-
getTrackerScrapeResponse
- Specified by:
getTrackerScrapeResponse
in interfacePEPeerManagerAdapter
-
getTrackerClientExtensions
- Specified by:
getTrackerClientExtensions
in interfacePEPeerManagerAdapter
-
setTrackerRefreshDelayOverrides
public void setTrackerRefreshDelayOverrides(int percent) - Specified by:
setTrackerRefreshDelayOverrides
in interfacePEPeerManagerAdapter
-
isMetadataDownload
public boolean isMetadataDownload()- Specified by:
isMetadataDownload
in interfacePEPeerManagerAdapter
-
getTorrentInfoDictSize
public int getTorrentInfoDictSize()- Specified by:
getTorrentInfoDictSize
in interfacePEPeerManagerAdapter
-
getTorrentInfoDict
- Specified by:
getTorrentInfoDict
in interfacePEPeerManagerAdapter
-
isNATHealthy
public boolean isNATHealthy()- Specified by:
isNATHealthy
in interfacePEPeerManagerAdapter
-
addPeer
- Specified by:
addPeer
in interfacePEPeerManagerAdapter
-
removePeer
- Specified by:
removePeer
in interfacePEPeerManagerAdapter
-
addPiece
- Specified by:
addPiece
in interfacePEPeerManagerAdapter
-
removePiece
- Specified by:
removePiece
in interfacePEPeerManagerAdapter
-
discarded
- Specified by:
discarded
in interfacePEPeerManagerAdapter
-
protocolBytesReceived
- Specified by:
protocolBytesReceived
in interfacePEPeerManagerAdapter
-
dataBytesReceived
- Specified by:
dataBytesReceived
in interfacePEPeerManagerAdapter
-
protocolBytesSent
- Specified by:
protocolBytesSent
in interfacePEPeerManagerAdapter
-
dataBytesSent
- Specified by:
dataBytesSent
in interfacePEPeerManagerAdapter
-
statsRequest
- Specified by:
statsRequest
in interfacePEPeerManagerAdapter
-
addHTTPSeed
- Specified by:
addHTTPSeed
in interfacePEPeerManagerAdapter
-
getSecrets
public byte[][] getSecrets(int crypto_level) - Specified by:
getSecrets
in interfacePEPeerManagerAdapter
-
enqueueReadRequest
public void enqueueReadRequest(PEPeer peer, DiskManagerReadRequest request, DiskManagerReadRequestListener listener) - Specified by:
enqueueReadRequest
in interfacePEPeerManagerAdapter
-
getPosition
public int getPosition()- Specified by:
getPosition
in interfacePEPeerManagerAdapter
-
isPeerSourceEnabled
- Specified by:
isPeerSourceEnabled
in interfacePEPeerManagerAdapter
-
hasPriorityConnection
public boolean hasPriorityConnection()- Specified by:
hasPriorityConnection
in interfacePEPeerManagerAdapter
-
priorityConnectionChanged
public void priorityConnectionChanged(boolean added) - Specified by:
priorityConnectionChanged
in interfacePEPeerManagerAdapter
-
saveTorrentState
public void saveTorrentState()- Specified by:
saveTorrentState
in interfacePEPeerManagerAdapter
-
getLogRelation
- Specified by:
getLogRelation
in interfacePEPeerManagerAdapter
-
getRelationText
Description copied from class:LogRelation
A short description of what your class holds that can be printed by the logger- Overrides:
getRelationText
in classLogRelation
- Returns:
-
getQueryableInterfaces
Description copied from class:LogRelation
Query this class for a reference to another class that it may hold- Overrides:
getQueryableInterfaces
in classLogRelation
- Returns:
- If found, the class desired. Otherwise, null.
-