org.gudy.azureus2.pluginsimpl.local.tracker
Class TrackerTorrentImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.tracker.TrackerTorrentImpl
All Implemented Interfaces:
TRHostTorrentListener, TRHostTorrentWillBeRemovedListener, TrackerTorrent

public class TrackerTorrentImpl
extends java.lang.Object
implements TrackerTorrent, TRHostTorrentListener, TRHostTorrentWillBeRemovedListener


Field Summary
protected  TRHostTorrent host_torrent
           
protected  java.util.List listeners_cow
           
protected  java.util.List removal_listeners
           
protected  AEMonitor this_mon
           
 
Fields inherited from interface org.gudy.azureus2.plugins.tracker.TrackerTorrent
TS_PUBLISHED, TS_STARTED, TS_STOPPED
 
Constructor Summary
TrackerTorrentImpl(TRHostTorrent _host_torrent)
           
 
Method Summary
 void addListener(TrackerTorrentListener listener)
           
 void addRemovalListener(TrackerTorrentWillBeRemovedListener listener)
           
 boolean canBeRemoved()
           
 void disableReplyCaching()
          stops the tracker from caching replies to announces/scrapes for this torrent
 boolean equals(java.lang.Object other)
           
 long getAnnounceCount()
           
 long getAverageAnnounceCount()
           
 long getAverageBytesIn()
          average rate of bytes in
 long getAverageBytesOut()
          average bytes sent
 long getAverageDownloaded()
           
 long getAverageScrapeCount()
           
 long getAverageUploaded()
           
 int getBadNATCount()
          Gives access to the number of peers that have failed NAT checks, 0 if NAT checking is disabled.
 long getCompletedCount()
           
 long getDateAdded()
           
 TRHostTorrent getHostTorrent()
           
 int getLeecherCount()
           
 TrackerPeer[] getPeers()
           
 long getScrapeCount()
           
 int getSeedCount()
           
 int getStatus()
           
 Torrent getTorrent()
           
 long getTotalBytesIn()
          total bytes received by the tracker for this torrent - announce and scrape requests
 long getTotalBytesOut()
          total bytes sent as response by the tracker - announce and scrape responses
 long getTotalDownloaded()
           
 long getTotalLeft()
           
 long getTotalUploaded()
           
 int hashCode()
           
 boolean isPassive()
           
 void postProcess(TRHostTorrentRequest request)
           
 void preProcess(TRHostTorrentRequest request)
           
 void remove()
           
 void removeListener(TrackerTorrentListener listener)
           
 void removeRemovalListener(TrackerTorrentWillBeRemovedListener listener)
           
 void start()
           
 void stop()
           
 void torrentWillBeRemoved(TRHostTorrent t)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host_torrent

protected TRHostTorrent host_torrent

listeners_cow

protected java.util.List listeners_cow

removal_listeners

protected java.util.List removal_listeners

this_mon

protected AEMonitor this_mon
Constructor Detail

TrackerTorrentImpl

public TrackerTorrentImpl(TRHostTorrent _host_torrent)
Method Detail

getHostTorrent

public TRHostTorrent getHostTorrent()

start

public void start()
           throws TrackerException
Specified by:
start in interface TrackerTorrent
Throws:
TrackerException

stop

public void stop()
          throws TrackerException
Specified by:
stop in interface TrackerTorrent
Throws:
TrackerException

remove

public void remove()
            throws TrackerTorrentRemovalVetoException
Specified by:
remove in interface TrackerTorrent
Throws:
TrackerTorrentRemovalVetoException

canBeRemoved

public boolean canBeRemoved()
                     throws TrackerTorrentRemovalVetoException
Specified by:
canBeRemoved in interface TrackerTorrent
Throws:
TrackerTorrentRemovalVetoException

getTorrent

public Torrent getTorrent()
Specified by:
getTorrent in interface TrackerTorrent

getPeers

public TrackerPeer[] getPeers()
Specified by:
getPeers in interface TrackerTorrent

getStatus

public int getStatus()
Specified by:
getStatus in interface TrackerTorrent

getTotalUploaded

public long getTotalUploaded()
Specified by:
getTotalUploaded in interface TrackerTorrent

getTotalDownloaded

public long getTotalDownloaded()
Specified by:
getTotalDownloaded in interface TrackerTorrent

getAverageUploaded

public long getAverageUploaded()
Specified by:
getAverageUploaded in interface TrackerTorrent

getAverageDownloaded

public long getAverageDownloaded()
Specified by:
getAverageDownloaded in interface TrackerTorrent

getTotalLeft

public long getTotalLeft()
Specified by:
getTotalLeft in interface TrackerTorrent

getCompletedCount

public long getCompletedCount()
Specified by:
getCompletedCount in interface TrackerTorrent

getTotalBytesIn

public long getTotalBytesIn()
Description copied from interface: TrackerTorrent
total bytes received by the tracker for this torrent - announce and scrape requests

Specified by:
getTotalBytesIn in interface TrackerTorrent
Returns:

getAverageBytesIn

public long getAverageBytesIn()
Description copied from interface: TrackerTorrent
average rate of bytes in

Specified by:
getAverageBytesIn in interface TrackerTorrent
Returns:

getTotalBytesOut

public long getTotalBytesOut()
Description copied from interface: TrackerTorrent
total bytes sent as response by the tracker - announce and scrape responses

Specified by:
getTotalBytesOut in interface TrackerTorrent
Returns:

getAverageBytesOut

public long getAverageBytesOut()
Description copied from interface: TrackerTorrent
average bytes sent

Specified by:
getAverageBytesOut in interface TrackerTorrent
Returns:

getAverageScrapeCount

public long getAverageScrapeCount()
Specified by:
getAverageScrapeCount in interface TrackerTorrent

getScrapeCount

public long getScrapeCount()
Specified by:
getScrapeCount in interface TrackerTorrent

getAverageAnnounceCount

public long getAverageAnnounceCount()
Specified by:
getAverageAnnounceCount in interface TrackerTorrent

getAnnounceCount

public long getAnnounceCount()
Specified by:
getAnnounceCount in interface TrackerTorrent

getSeedCount

public int getSeedCount()
Specified by:
getSeedCount in interface TrackerTorrent

getLeecherCount

public int getLeecherCount()
Specified by:
getLeecherCount in interface TrackerTorrent

getBadNATCount

public int getBadNATCount()
Description copied from interface: TrackerTorrent
Gives access to the number of peers that have failed NAT checks, 0 if NAT checking is disabled.

Specified by:
getBadNATCount in interface TrackerTorrent
Returns:

disableReplyCaching

public void disableReplyCaching()
Description copied from interface: TrackerTorrent
stops the tracker from caching replies to announces/scrapes for this torrent

Specified by:
disableReplyCaching in interface TrackerTorrent

isPassive

public boolean isPassive()
Specified by:
isPassive in interface TrackerTorrent

getDateAdded

public long getDateAdded()
Specified by:
getDateAdded in interface TrackerTorrent
Returns:

preProcess

public void preProcess(TRHostTorrentRequest request)
                throws TRHostException
Specified by:
preProcess in interface TRHostTorrentListener
Throws:
TRHostException

postProcess

public void postProcess(TRHostTorrentRequest request)
                 throws TRHostException
Specified by:
postProcess in interface TRHostTorrentListener
Throws:
TRHostException

addListener

public void addListener(TrackerTorrentListener listener)
Specified by:
addListener in interface TrackerTorrent

removeListener

public void removeListener(TrackerTorrentListener listener)
Specified by:
removeListener in interface TrackerTorrent

torrentWillBeRemoved

public void torrentWillBeRemoved(TRHostTorrent t)
                          throws TRHostTorrentRemovalVetoException
Specified by:
torrentWillBeRemoved in interface TRHostTorrentWillBeRemovedListener
Throws:
TRHostTorrentRemovalVetoException

addRemovalListener

public void addRemovalListener(TrackerTorrentWillBeRemovedListener listener)
Specified by:
addRemovalListener in interface TrackerTorrent

removeRemovalListener

public void removeRemovalListener(TrackerTorrentWillBeRemovedListener listener)
Specified by:
removeRemovalListener in interface TrackerTorrent

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object