com.aelitis.azureus.core.lws
Class LWSPeerManagerAdapter

java.lang.Object
  extended by org.gudy.azureus2.core3.logging.LogRelation
      extended by com.aelitis.azureus.core.lws.LWSPeerManagerAdapter
All Implemented Interfaces:
PEPeerManagerAdapter

public class LWSPeerManagerAdapter
extends LogRelation
implements PEPeerManagerAdapter


Constructor Summary
LWSPeerManagerAdapter(LightWeightSeed _lws, PeerManagerRegistration _peer_manager_registration)
           
 
Method Summary
 void addHTTPSeed(java.lang.String address, int port)
           
 void addPeer(PEPeer peer)
           
 void addPiece(PEPiece piece)
           
 void dataBytesReceived(PEPeer peer, int bytes)
           
 void dataBytesSent(PEPeer peer, int bytes)
           
 void discarded(PEPeer peer, int bytes)
           
 void enqueueReadRequest(PEPeer peer, DiskManagerReadRequest request, DiskManagerReadRequestListener listener)
           
 int getCryptoLevel()
          See NetworkManager.CRYPTO_OVERRIDE constants
 java.lang.String getDisplayName()
           
 int getDownloadRateLimitBytesPerSecond()
           
 java.lang.String[] getEnabledNetworks()
           
 int getExtendedMessagingMode()
           
 LogRelation getLogRelation()
           
 int[] getMaxConnections()
           
 int[] getMaxSeedConnections()
           
 int getMaxUploads()
           
 PeerManagerRegistration getPeerManagerRegistration()
           
 int getPermittedBytesToReceive()
           
 int getPermittedBytesToSend()
           
 int getPosition()
           
 java.lang.Object[] getQueryableInterfaces()
          Query this class for a reference to another class that it may hold
 long getRandomSeed()
           
 java.lang.String getRelationText()
          A short description of what your class holds that can be printed by the logger
 byte[][] getSecrets(int crypto_level)
           
 byte[] getTorrentInfoDict(PEPeer peer)
           
 int getTorrentInfoDictSize()
           
 java.lang.String getTrackerClientExtensions()
           
 TRTrackerScraperResponse getTrackerScrapeResponse()
           
 int getUploadPriority()
           
 int getUploadRateLimitBytesPerSecond()
           
 boolean hasPriorityConnection()
           
 boolean isMetadataDownload()
           
 boolean isNATHealthy()
           
 boolean isNetworkEnabled(java.lang.String network)
           
 boolean isPeerExchangeEnabled()
           
 boolean isPeerSourceEnabled(java.lang.String peer_source)
           
 boolean isPeriodicRescanEnabled()
           
 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 setStateFinishing()
           
 void setStateSeeding(boolean never_downloaded)
           
 void setTrackerRefreshDelayOverrides(int percent)
           
 void statsRequest(PEPeer originator, java.util.Map request, java.util.Map reply)
           
 
Methods inherited from class org.gudy.azureus2.core3.logging.LogRelation
propogatedRelationText, queryForClass, queryForClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LWSPeerManagerAdapter

public LWSPeerManagerAdapter(LightWeightSeed _lws,
                             PeerManagerRegistration _peer_manager_registration)
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface PEPeerManagerAdapter

getPeerManagerRegistration

public PeerManagerRegistration getPeerManagerRegistration()
Specified by:
getPeerManagerRegistration in interface PEPeerManagerAdapter

getUploadRateLimitBytesPerSecond

public int getUploadRateLimitBytesPerSecond()
Specified by:
getUploadRateLimitBytesPerSecond in interface PEPeerManagerAdapter

getDownloadRateLimitBytesPerSecond

public int getDownloadRateLimitBytesPerSecond()
Specified by:
getDownloadRateLimitBytesPerSecond in interface PEPeerManagerAdapter

getPermittedBytesToReceive

public int getPermittedBytesToReceive()
Specified by:
getPermittedBytesToReceive in interface PEPeerManagerAdapter

permittedReceiveBytesUsed

public void permittedReceiveBytesUsed(int bytes)
Specified by:
permittedReceiveBytesUsed in interface PEPeerManagerAdapter

getPermittedBytesToSend

public int getPermittedBytesToSend()
Specified by:
getPermittedBytesToSend in interface PEPeerManagerAdapter

permittedSendBytesUsed

public void permittedSendBytesUsed(int bytes)
Specified by:
permittedSendBytesUsed in interface PEPeerManagerAdapter

getUploadPriority

public int getUploadPriority()
Specified by:
getUploadPriority in interface PEPeerManagerAdapter

getMaxUploads

public int getMaxUploads()
Specified by:
getMaxUploads in interface PEPeerManagerAdapter

getMaxConnections

public int[] getMaxConnections()
Specified by:
getMaxConnections in interface PEPeerManagerAdapter

getMaxSeedConnections

public int[] getMaxSeedConnections()
Specified by:
getMaxSeedConnections in interface PEPeerManagerAdapter

getExtendedMessagingMode

public int getExtendedMessagingMode()
Specified by:
getExtendedMessagingMode in interface PEPeerManagerAdapter

isPeerExchangeEnabled

public boolean isPeerExchangeEnabled()
Specified by:
isPeerExchangeEnabled in interface PEPeerManagerAdapter

isNetworkEnabled

public boolean isNetworkEnabled(java.lang.String network)
Specified by:
isNetworkEnabled in interface PEPeerManagerAdapter

getEnabledNetworks

public java.lang.String[] getEnabledNetworks()
Specified by:
getEnabledNetworks in interface PEPeerManagerAdapter

getCryptoLevel

public int getCryptoLevel()
Description copied from interface: PEPeerManagerAdapter
See NetworkManager.CRYPTO_OVERRIDE constants

Specified by:
getCryptoLevel in interface PEPeerManagerAdapter
Returns:

getRandomSeed

public long getRandomSeed()
Specified by:
getRandomSeed in interface PEPeerManagerAdapter

isPeriodicRescanEnabled

public boolean isPeriodicRescanEnabled()
Specified by:
isPeriodicRescanEnabled in interface PEPeerManagerAdapter

setStateFinishing

public void setStateFinishing()
Specified by:
setStateFinishing in interface PEPeerManagerAdapter

setStateSeeding

public void setStateSeeding(boolean never_downloaded)
Specified by:
setStateSeeding in interface PEPeerManagerAdapter

restartDownload

public void restartDownload(boolean recheck)
Specified by:
restartDownload in interface PEPeerManagerAdapter

getTrackerScrapeResponse

public TRTrackerScraperResponse getTrackerScrapeResponse()
Specified by:
getTrackerScrapeResponse in interface PEPeerManagerAdapter

getTrackerClientExtensions

public java.lang.String getTrackerClientExtensions()
Specified by:
getTrackerClientExtensions in interface PEPeerManagerAdapter

setTrackerRefreshDelayOverrides

public void setTrackerRefreshDelayOverrides(int percent)
Specified by:
setTrackerRefreshDelayOverrides in interface PEPeerManagerAdapter

isMetadataDownload

public boolean isMetadataDownload()
Specified by:
isMetadataDownload in interface PEPeerManagerAdapter

getTorrentInfoDictSize

public int getTorrentInfoDictSize()
Specified by:
getTorrentInfoDictSize in interface PEPeerManagerAdapter

getTorrentInfoDict

public byte[] getTorrentInfoDict(PEPeer peer)
Specified by:
getTorrentInfoDict in interface PEPeerManagerAdapter

isNATHealthy

public boolean isNATHealthy()
Specified by:
isNATHealthy in interface PEPeerManagerAdapter

addPeer

public void addPeer(PEPeer peer)
Specified by:
addPeer in interface PEPeerManagerAdapter

removePeer

public void removePeer(PEPeer peer)
Specified by:
removePeer in interface PEPeerManagerAdapter

addPiece

public void addPiece(PEPiece piece)
Specified by:
addPiece in interface PEPeerManagerAdapter

removePiece

public void removePiece(PEPiece piece)
Specified by:
removePiece in interface PEPeerManagerAdapter

discarded

public void discarded(PEPeer peer,
                      int bytes)
Specified by:
discarded in interface PEPeerManagerAdapter

protocolBytesReceived

public void protocolBytesReceived(PEPeer peer,
                                  int bytes)
Specified by:
protocolBytesReceived in interface PEPeerManagerAdapter

dataBytesReceived

public void dataBytesReceived(PEPeer peer,
                              int bytes)
Specified by:
dataBytesReceived in interface PEPeerManagerAdapter

protocolBytesSent

public void protocolBytesSent(PEPeer peer,
                              int bytes)
Specified by:
protocolBytesSent in interface PEPeerManagerAdapter

dataBytesSent

public void dataBytesSent(PEPeer peer,
                          int bytes)
Specified by:
dataBytesSent in interface PEPeerManagerAdapter

statsRequest

public void statsRequest(PEPeer originator,
                         java.util.Map request,
                         java.util.Map reply)
Specified by:
statsRequest in interface PEPeerManagerAdapter

addHTTPSeed

public void addHTTPSeed(java.lang.String address,
                        int port)
Specified by:
addHTTPSeed in interface PEPeerManagerAdapter

getSecrets

public byte[][] getSecrets(int crypto_level)
Specified by:
getSecrets in interface PEPeerManagerAdapter

enqueueReadRequest

public void enqueueReadRequest(PEPeer peer,
                               DiskManagerReadRequest request,
                               DiskManagerReadRequestListener listener)
Specified by:
enqueueReadRequest in interface PEPeerManagerAdapter

getPosition

public int getPosition()
Specified by:
getPosition in interface PEPeerManagerAdapter

isPeerSourceEnabled

public boolean isPeerSourceEnabled(java.lang.String peer_source)
Specified by:
isPeerSourceEnabled in interface PEPeerManagerAdapter

hasPriorityConnection

public boolean hasPriorityConnection()
Specified by:
hasPriorityConnection in interface PEPeerManagerAdapter

priorityConnectionChanged

public void priorityConnectionChanged(boolean added)
Specified by:
priorityConnectionChanged in interface PEPeerManagerAdapter

getLogRelation

public LogRelation getLogRelation()
Specified by:
getLogRelation in interface PEPeerManagerAdapter

getRelationText

public java.lang.String getRelationText()
Description copied from class: LogRelation
A short description of what your class holds that can be printed by the logger

Overrides:
getRelationText in class LogRelation
Returns:

getQueryableInterfaces

public java.lang.Object[] getQueryableInterfaces()
Description copied from class: LogRelation
Query this class for a reference to another class that it may hold

Overrides:
getQueryableInterfaces in class LogRelation
Returns:
If found, the class desired. Otherwise, null.