org.gudy.azureus2.core3.tracker.host.impl
Class TRHostTorrentHostImpl
java.lang.Object
org.gudy.azureus2.core3.tracker.host.impl.TRHostTorrentHostImpl
- All Implemented Interfaces:
- TRHostTorrent
public class TRHostTorrentHostImpl
- extends Object
- implements TRHostTorrent
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
this_mon
protected final AEMonitor this_mon
TRHostTorrentHostImpl
protected TRHostTorrentHostImpl(TRHostImpl _host,
TRTrackerServer _server,
TOTorrent _torrent,
int _port,
long _date_added)
getPort
public int getPort()
- Specified by:
getPort
in interface TRHostTorrent
start
public void start()
- Specified by:
start
in interface TRHostTorrent
startSupport
protected void startSupport()
stop
public void stop()
- Specified by:
stop
in interface TRHostTorrent
stopSupport
protected void stopSupport()
remove
public void remove()
throws TRHostTorrentRemovalVetoException
- Specified by:
remove
in interface TRHostTorrent
- Throws:
TRHostTorrentRemovalVetoException
canBeRemoved
public boolean canBeRemoved()
throws TRHostTorrentRemovalVetoException
- Description copied from interface:
TRHostTorrent
- doesn't guarantee that removal will be successful as conditions may change
- Specified by:
canBeRemoved
in interface TRHostTorrent
- Returns:
- true if OK, exception thrown otherwise
- Throws:
TRHostTorrentRemovalVetoException
getStatus
public int getStatus()
- Specified by:
getStatus
in interface TRHostTorrent
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interface TRHostTorrent
setPersistent
protected void setPersistent(boolean _persistent)
isPassive
public boolean isPassive()
- Specified by:
isPassive
in interface TRHostTorrent
setPassive
public void setPassive(boolean b)
- Specified by:
setPassive
in interface TRHostTorrent
getDateAdded
public long getDateAdded()
- Specified by:
getDateAdded
in interface TRHostTorrent
getTorrent
public TOTorrent getTorrent()
- Specified by:
getTorrent
in interface TRHostTorrent
setTorrent
public void setTorrent(TOTorrent _torrent)
- Specified by:
setTorrent
in interface TRHostTorrent
setTorrentInternal
protected void setTorrentInternal(TOTorrent _torrent)
getTrackerTorrent
public TRTrackerServerTorrent getTrackerTorrent()
- Specified by:
getTrackerTorrent
in interface TRHostTorrent
getPeers
public TRHostPeer[] getPeers()
- Specified by:
getPeers
in interface TRHostTorrent
getStats
protected TRTrackerServerTorrentStats getStats()
setStartOfDayValues
protected void setStartOfDayValues(long _date_added,
long completed,
long announces,
long scrapes,
long uploaded,
long downloaded,
long bytes_in,
long bytes_out)
getSeedCount
public int getSeedCount()
- Specified by:
getSeedCount
in interface TRHostTorrent
getLeecherCount
public int getLeecherCount()
- Specified by:
getLeecherCount
in interface TRHostTorrent
getBadNATCount
public int getBadNATCount()
- Specified by:
getBadNATCount
in interface TRHostTorrent
updateStats
protected void updateStats()
getServer
protected TRTrackerServer getServer()
getTotalUploaded
public long getTotalUploaded()
- Specified by:
getTotalUploaded
in interface TRHostTorrent
getTotalDownloaded
public long getTotalDownloaded()
- Specified by:
getTotalDownloaded
in interface TRHostTorrent
getTotalLeft
public long getTotalLeft()
- Specified by:
getTotalLeft
in interface TRHostTorrent
getTotalBytesIn
public long getTotalBytesIn()
- Specified by:
getTotalBytesIn
in interface TRHostTorrent
getTotalBytesOut
public long getTotalBytesOut()
- Specified by:
getTotalBytesOut
in interface TRHostTorrent
getAnnounceCount
public long getAnnounceCount()
- Specified by:
getAnnounceCount
in interface TRHostTorrent
getScrapeCount
public long getScrapeCount()
- Specified by:
getScrapeCount
in interface TRHostTorrent
getCompletedCount
public long getCompletedCount()
- Specified by:
getCompletedCount
in interface TRHostTorrent
getAverageBytesIn
public long getAverageBytesIn()
- Specified by:
getAverageBytesIn
in interface TRHostTorrent
getAverageBytesOut
public long getAverageBytesOut()
- Specified by:
getAverageBytesOut
in interface TRHostTorrent
getAverageUploaded
public long getAverageUploaded()
- Specified by:
getAverageUploaded
in interface TRHostTorrent
getAverageDownloaded
public long getAverageDownloaded()
- Specified by:
getAverageDownloaded
in interface TRHostTorrent
getAverageAnnounceCount
public long getAverageAnnounceCount()
- Specified by:
getAverageAnnounceCount
in interface TRHostTorrent
getAverageScrapeCount
public long getAverageScrapeCount()
- Specified by:
getAverageScrapeCount
in interface TRHostTorrent
disableReplyCaching
public void disableReplyCaching()
- Specified by:
disableReplyCaching
in interface TRHostTorrent
preProcess
protected void preProcess(TRHostTorrentRequest req)
throws TRHostException
- Throws:
TRHostException
postProcess
protected void postProcess(TRHostTorrentRequest req)
throws TRHostException
- Throws:
TRHostException
addListener
public void addListener(TRHostTorrentListener l)
- Specified by:
addListener
in interface TRHostTorrent
removeListener
public void removeListener(TRHostTorrentListener l)
- Specified by:
removeListener
in interface TRHostTorrent
addRemovalListener
public void addRemovalListener(TRHostTorrentWillBeRemovedListener l)
- Specified by:
addRemovalListener
in interface TRHostTorrent
removeRemovalListener
public void removeRemovalListener(TRHostTorrentWillBeRemovedListener l)
- Specified by:
removeRemovalListener
in interface TRHostTorrent
getData
public Object getData(String key)
- To retreive arbitrary objects against this object.
- Specified by:
getData
in interface TRHostTorrent
setData
public void setData(String key,
Object value)
- To store arbitrary objects against this object.
- Specified by:
setData
in interface TRHostTorrent