Class DownloadAnnounceResultImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.download.DownloadAnnounceResultImpl
-
- All Implemented Interfaces:
DownloadAnnounceResult
public class DownloadAnnounceResultImpl extends java.lang.Object implements DownloadAnnounceResult
-
-
Field Summary
Fields Modifier and Type Field Description protected Download
download
protected TRTrackerAnnouncerResponse
response
-
Fields inherited from interface com.biglybt.pif.download.DownloadAnnounceResult
RT_ERROR, RT_SUCCESS
-
-
Constructor Summary
Constructors Constructor Description DownloadAnnounceResultImpl(Download _download, TRTrackerAnnouncerResponse _response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAdditionalInfo()
Download
getDownload()
Gives access to the Download associated with this announce resultjava.lang.String
getError()
For RT_ERROR this gives error detailsjava.util.Map
getExtensions()
int
getNonSeedCount()
This method gives the number of non-seeds (peers) we know aboutDownloadAnnounceResultPeer[]
getPeers()
int
getReportedPeerCount()
For RT_SUCCESS this gives the number of peers returned by the trackerint
getResponseType()
The response may represent a successful or failed announceint
getSeedCount()
This method gives the number of seeds we know about (and may have received from a succession of announces).long
getTimeToWait()
java.net.URL
getURL()
The URL for the tracker.void
setContent(TRTrackerAnnouncerResponse _response)
-
-
-
Field Detail
-
download
protected Download download
-
response
protected TRTrackerAnnouncerResponse response
-
-
Constructor Detail
-
DownloadAnnounceResultImpl
public DownloadAnnounceResultImpl(Download _download, TRTrackerAnnouncerResponse _response)
-
-
Method Detail
-
setContent
public void setContent(TRTrackerAnnouncerResponse _response)
-
getDownload
public Download getDownload()
Description copied from interface:DownloadAnnounceResult
Gives access to the Download associated with this announce result- Specified by:
getDownload
in interfaceDownloadAnnounceResult
- Returns:
-
getResponseType
public int getResponseType()
Description copied from interface:DownloadAnnounceResult
The response may represent a successful or failed announce- Specified by:
getResponseType
in interfaceDownloadAnnounceResult
- Returns:
- either RT_SUCCESS or RT_ERROR
-
getReportedPeerCount
public int getReportedPeerCount()
Description copied from interface:DownloadAnnounceResult
For RT_SUCCESS this gives the number of peers returned by the tracker- Specified by:
getReportedPeerCount
in interfaceDownloadAnnounceResult
- Returns:
-
getSeedCount
public int getSeedCount()
Description copied from interface:DownloadAnnounceResult
This method gives the number of seeds we know about (and may have received from a succession of announces).- Specified by:
getSeedCount
in interfaceDownloadAnnounceResult
- Returns:
-
getNonSeedCount
public int getNonSeedCount()
Description copied from interface:DownloadAnnounceResult
This method gives the number of non-seeds (peers) we know about- Specified by:
getNonSeedCount
in interfaceDownloadAnnounceResult
- Returns:
-
getError
public java.lang.String getError()
Description copied from interface:DownloadAnnounceResult
For RT_ERROR this gives error details- Specified by:
getError
in interfaceDownloadAnnounceResult
- Returns:
-
getAdditionalInfo
public java.lang.String getAdditionalInfo()
- Specified by:
getAdditionalInfo
in interfaceDownloadAnnounceResult
-
getURL
public java.net.URL getURL()
Description copied from interface:DownloadAnnounceResult
The URL for the tracker.- Specified by:
getURL
in interfaceDownloadAnnounceResult
- Returns:
- WILL BE NULL if the torrent isn't running
-
getPeers
public DownloadAnnounceResultPeer[] getPeers()
- Specified by:
getPeers
in interfaceDownloadAnnounceResult
-
getTimeToWait
public long getTimeToWait()
- Specified by:
getTimeToWait
in interfaceDownloadAnnounceResult
-
getExtensions
public java.util.Map getExtensions()
- Specified by:
getExtensions
in interfaceDownloadAnnounceResult
-
-