Class DownloadImpl.AggregateScrapeResult
- java.lang.Object
-
- com.biglybt.pifimpl.local.download.DownloadImpl.AggregateScrapeResult
-
- All Implemented Interfaces:
DownloadScrapeResult
- Enclosing class:
- DownloadImpl
private static class DownloadImpl.AggregateScrapeResult extends java.lang.Object implements DownloadScrapeResult
-
-
Field Summary
Fields Modifier and Type Field Description private Download
dl
private int
leechers
private TRTrackerScraperResponse
response
private int
seeds
private int
time_secs
-
Fields inherited from interface com.biglybt.pif.download.DownloadScrapeResult
RT_ERROR, RT_SUCCESS
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AggregateScrapeResult(Download _dl, DownloadManager _dm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Download
getDownload()
Gives access to the associated downloadlong
getNextScrapeStartTime()
int
getNonSeedCount()
Gives the number of non-seeds returned by the scrapeint
getResponseType()
A scrape result can denote either a successful or failed scrape.long
getScrapeStartTime()
int
getSeedCount()
Gives the number of seeds returned by the scrapejava.lang.String
getStatus()
returns a string representation of the scrape statusjava.net.URL
getURL()
The URL for the trackervoid
setNextScrapeStartTime(long nextScrapeStartTime)
Sets the next scrape timeprivate void
update(TRTrackerScraperResponse _response, int _seeds, int _peers, int _time_secs)
-
-
-
Field Detail
-
dl
private Download dl
-
response
private TRTrackerScraperResponse response
-
seeds
private int seeds
-
leechers
private int leechers
-
time_secs
private int time_secs
-
-
Constructor Detail
-
AggregateScrapeResult
private AggregateScrapeResult(Download _dl, DownloadManager _dm)
-
-
Method Detail
-
update
private void update(TRTrackerScraperResponse _response, int _seeds, int _peers, int _time_secs)
-
getDownload
public Download getDownload()
Description copied from interface:DownloadScrapeResult
Gives access to the associated download- Specified by:
getDownload
in interfaceDownloadScrapeResult
- Returns:
-
getResponseType
public int getResponseType()
Description copied from interface:DownloadScrapeResult
A scrape result can denote either a successful or failed scrape.- Specified by:
getResponseType
in interfaceDownloadScrapeResult
- Returns:
- RT_SUCCESS or RT_ERROR
-
getSeedCount
public int getSeedCount()
Description copied from interface:DownloadScrapeResult
Gives the number of seeds returned by the scrape- Specified by:
getSeedCount
in interfaceDownloadScrapeResult
- Returns:
-
getNonSeedCount
public int getNonSeedCount()
Description copied from interface:DownloadScrapeResult
Gives the number of non-seeds returned by the scrape- Specified by:
getNonSeedCount
in interfaceDownloadScrapeResult
- Returns:
-
getScrapeStartTime
public long getScrapeStartTime()
- Specified by:
getScrapeStartTime
in interfaceDownloadScrapeResult
-
setNextScrapeStartTime
public void setNextScrapeStartTime(long nextScrapeStartTime)
Description copied from interface:DownloadScrapeResult
Sets the next scrape time- Specified by:
setNextScrapeStartTime
in interfaceDownloadScrapeResult
- Parameters:
nextScrapeStartTime
- time to start in milliseconds since epoch
-
getNextScrapeStartTime
public long getNextScrapeStartTime()
- Specified by:
getNextScrapeStartTime
in interfaceDownloadScrapeResult
-
getStatus
public java.lang.String getStatus()
Description copied from interface:DownloadScrapeResult
returns a string representation of the scrape status- Specified by:
getStatus
in interfaceDownloadScrapeResult
- Returns:
-
getURL
public java.net.URL getURL()
Description copied from interface:DownloadScrapeResult
The URL for the tracker- Specified by:
getURL
in interfaceDownloadScrapeResult
- Returns:
-
-