Class TRTrackerAnnouncerResponseImpl
java.lang.Object
com.biglybt.core.tracker.client.impl.TRTrackerAnnouncerResponseImpl
- All Implemented Interfaces:
TRTrackerAnnouncerResponse
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
protected Map
private final HashWrapper
protected TRTrackerAnnouncerResponsePeer[]
private TRTrackerAnnouncerRequest
private int
private int
private int
private final int
private final long
private final URL
private boolean
Fields inherited from interface com.biglybt.core.tracker.client.TRTrackerAnnouncerResponse
ST_OFFLINE, ST_ONLINE, ST_REPORTED_ERROR
-
Constructor Summary
ConstructorsConstructorDescriptionTRTrackerAnnouncerResponseImpl
(URL _url, HashWrapper _hash, int _status, long _time_to_wait) TRTrackerAnnouncerResponseImpl
(URL _url, HashWrapper _hash, int _status, long _time_to_wait, TRTrackerAnnouncerResponsePeer[] _peers) TRTrackerAnnouncerResponseImpl
(URL _url, HashWrapper _hash, int _status, long _time_to_wait, String _additional_info) -
Method Summary
Modifier and TypeMethodDescriptionReturns any additional textual information associated with reponse.getHash()
getPeers()
int
int
int
int
Returns the current status of the trackerlong
This value is always availablegetURL()
void
print()
void
setAdditionalInfo
(String info) void
setExtensions
(Map _extensions) void
setPeers
(TRTrackerAnnouncerResponsePeer[] _peers) void
setRequest
(TRTrackerAnnouncerRequest _request) void
setScrapeResult
(int _complete, int _incomplete, int _downloaded) void
boolean
wasProbe()
-
Field Details
-
url
-
hash
-
status
private final int status -
time_to_wait
private final long time_to_wait -
additional_info
-
was_udp_probe
private boolean was_udp_probe -
scrape_complete
private int scrape_complete -
scrape_incomplete
private int scrape_incomplete -
scrape_downloaded
private int scrape_downloaded -
peers
-
extensions
-
request
-
-
Constructor Details
-
TRTrackerAnnouncerResponseImpl
-
TRTrackerAnnouncerResponseImpl
public TRTrackerAnnouncerResponseImpl(URL _url, HashWrapper _hash, int _status, long _time_to_wait, String _additional_info) -
TRTrackerAnnouncerResponseImpl
public TRTrackerAnnouncerResponseImpl(URL _url, HashWrapper _hash, int _status, long _time_to_wait, TRTrackerAnnouncerResponsePeer[] _peers)
-
-
Method Details
-
setRequest
-
getRequest
- Specified by:
getRequest
in interfaceTRTrackerAnnouncerResponse
-
getHash
- Specified by:
getHash
in interfaceTRTrackerAnnouncerResponse
-
getStatus
public int getStatus()Description copied from interface:TRTrackerAnnouncerResponse
Returns the current status of the tracker- Specified by:
getStatus
in interfaceTRTrackerAnnouncerResponse
- Returns:
- see above ST_ set
-
getStatusString
- Specified by:
getStatusString
in interfaceTRTrackerAnnouncerResponse
-
setAdditionalInfo
-
setWasProbe
public void setWasProbe() -
wasProbe
public boolean wasProbe() -
getTimeToWait
public long getTimeToWait()Description copied from interface:TRTrackerAnnouncerResponse
This value is always available- Specified by:
getTimeToWait
in interfaceTRTrackerAnnouncerResponse
- Returns:
- time to wait before requerying tracker
-
getAdditionalInfo
Description copied from interface:TRTrackerAnnouncerResponse
Returns any additional textual information associated with reponse. If the status is ST_REPORTED_ERROR, this will return the error description (possibly directly from the tracker).- Specified by:
getAdditionalInfo
in interfaceTRTrackerAnnouncerResponse
- Returns:
- Additional information
-
setPeers
- Specified by:
setPeers
in interfaceTRTrackerAnnouncerResponse
-
getPeers
- Specified by:
getPeers
in interfaceTRTrackerAnnouncerResponse
- Returns:
- peers reported by tracker. this will include the local peer as well
-
setExtensions
-
getExtensions
- Specified by:
getExtensions
in interfaceTRTrackerAnnouncerResponse
-
getURL
- Specified by:
getURL
in interfaceTRTrackerAnnouncerResponse
-
getScrapeCompleteCount
public int getScrapeCompleteCount()- Specified by:
getScrapeCompleteCount
in interfaceTRTrackerAnnouncerResponse
-
getScrapeIncompleteCount
public int getScrapeIncompleteCount()- Specified by:
getScrapeIncompleteCount
in interfaceTRTrackerAnnouncerResponse
-
getScrapeDownloadedCount
public int getScrapeDownloadedCount()- Specified by:
getScrapeDownloadedCount
in interfaceTRTrackerAnnouncerResponse
-
setScrapeResult
public void setScrapeResult(int _complete, int _incomplete, int _downloaded) -
print
public void print()- Specified by:
print
in interfaceTRTrackerAnnouncerResponse
-
getString
-