Class TrackerTorrentImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.tracker.TrackerTorrentImpl
-
- All Implemented Interfaces:
TRHostTorrentListener
,TRHostTorrentWillBeRemovedListener
,TrackerTorrent
public class TrackerTorrentImpl extends java.lang.Object implements TrackerTorrent, TRHostTorrentListener, TRHostTorrentWillBeRemovedListener
-
-
Field Summary
Fields Modifier and Type Field Description protected TRHostTorrent
host_torrent
protected java.util.List
listeners_cow
protected java.util.List
removal_listeners
protected AEMonitor
this_mon
-
Fields inherited from interface com.biglybt.pif.tracker.TrackerTorrent
TS_PUBLISHED, TS_STARTED, TS_STOPPED
-
-
Constructor Summary
Constructors Constructor Description TrackerTorrentImpl(TRHostTorrent _host_torrent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(TrackerTorrentListener listener)
void
addRemovalListener(TrackerTorrentWillBeRemovedListener listener)
boolean
canBeRemoved()
void
disableReplyCaching()
stops the tracker from caching replies to announces/scrapes for this torrentboolean
equals(java.lang.Object other)
long
getAnnounceCount()
long
getAverageAnnounceCount()
long
getAverageBytesIn()
average rate of bytes inlong
getAverageBytesOut()
average bytes sentlong
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 requestslong
getTotalBytesOut()
total bytes sent as response by the tracker - announce and scrape responseslong
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)
-
-
-
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 interfaceTrackerTorrent
- Throws:
TrackerException
-
stop
public void stop() throws TrackerException
- Specified by:
stop
in interfaceTrackerTorrent
- Throws:
TrackerException
-
remove
public void remove() throws TrackerTorrentRemovalVetoException
- Specified by:
remove
in interfaceTrackerTorrent
- Throws:
TrackerTorrentRemovalVetoException
-
canBeRemoved
public boolean canBeRemoved() throws TrackerTorrentRemovalVetoException
- Specified by:
canBeRemoved
in interfaceTrackerTorrent
- Throws:
TrackerTorrentRemovalVetoException
-
getTorrent
public Torrent getTorrent()
- Specified by:
getTorrent
in interfaceTrackerTorrent
-
getPeers
public TrackerPeer[] getPeers()
- Specified by:
getPeers
in interfaceTrackerTorrent
-
getStatus
public int getStatus()
- Specified by:
getStatus
in interfaceTrackerTorrent
-
getTotalUploaded
public long getTotalUploaded()
- Specified by:
getTotalUploaded
in interfaceTrackerTorrent
-
getTotalDownloaded
public long getTotalDownloaded()
- Specified by:
getTotalDownloaded
in interfaceTrackerTorrent
-
getAverageUploaded
public long getAverageUploaded()
- Specified by:
getAverageUploaded
in interfaceTrackerTorrent
-
getAverageDownloaded
public long getAverageDownloaded()
- Specified by:
getAverageDownloaded
in interfaceTrackerTorrent
-
getTotalLeft
public long getTotalLeft()
- Specified by:
getTotalLeft
in interfaceTrackerTorrent
-
getCompletedCount
public long getCompletedCount()
- Specified by:
getCompletedCount
in interfaceTrackerTorrent
-
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 interfaceTrackerTorrent
- Returns:
-
getAverageBytesIn
public long getAverageBytesIn()
Description copied from interface:TrackerTorrent
average rate of bytes in- Specified by:
getAverageBytesIn
in interfaceTrackerTorrent
- 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 interfaceTrackerTorrent
- Returns:
-
getAverageBytesOut
public long getAverageBytesOut()
Description copied from interface:TrackerTorrent
average bytes sent- Specified by:
getAverageBytesOut
in interfaceTrackerTorrent
- Returns:
-
getAverageScrapeCount
public long getAverageScrapeCount()
- Specified by:
getAverageScrapeCount
in interfaceTrackerTorrent
-
getScrapeCount
public long getScrapeCount()
- Specified by:
getScrapeCount
in interfaceTrackerTorrent
-
getAverageAnnounceCount
public long getAverageAnnounceCount()
- Specified by:
getAverageAnnounceCount
in interfaceTrackerTorrent
-
getAnnounceCount
public long getAnnounceCount()
- Specified by:
getAnnounceCount
in interfaceTrackerTorrent
-
getSeedCount
public int getSeedCount()
- Specified by:
getSeedCount
in interfaceTrackerTorrent
-
getLeecherCount
public int getLeecherCount()
- Specified by:
getLeecherCount
in interfaceTrackerTorrent
-
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 interfaceTrackerTorrent
- 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 interfaceTrackerTorrent
-
isPassive
public boolean isPassive()
- Specified by:
isPassive
in interfaceTrackerTorrent
-
getDateAdded
public long getDateAdded()
- Specified by:
getDateAdded
in interfaceTrackerTorrent
- Returns:
-
preProcess
public void preProcess(TRHostTorrentRequest request) throws TRHostException
- Specified by:
preProcess
in interfaceTRHostTorrentListener
- Throws:
TRHostException
-
postProcess
public void postProcess(TRHostTorrentRequest request) throws TRHostException
- Specified by:
postProcess
in interfaceTRHostTorrentListener
- Throws:
TRHostException
-
addListener
public void addListener(TrackerTorrentListener listener)
- Specified by:
addListener
in interfaceTrackerTorrent
-
removeListener
public void removeListener(TrackerTorrentListener listener)
- Specified by:
removeListener
in interfaceTrackerTorrent
-
torrentWillBeRemoved
public void torrentWillBeRemoved(TRHostTorrent t) throws TRHostTorrentRemovalVetoException
- Specified by:
torrentWillBeRemoved
in interfaceTRHostTorrentWillBeRemovedListener
- Throws:
TRHostTorrentRemovalVetoException
-
addRemovalListener
public void addRemovalListener(TrackerTorrentWillBeRemovedListener listener)
- Specified by:
addRemovalListener
in interfaceTrackerTorrent
-
removeRemovalListener
public void removeRemovalListener(TrackerTorrentWillBeRemovedListener listener)
- Specified by:
removeRemovalListener
in interfaceTrackerTorrent
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-