java.lang.Object
org.klomp.snark.TrackerClient.TCTracker
- Enclosing class:
TrackerClient
One tracker's URL and per-tracker state.
Field Summary
FieldsModifier and TypeFieldDescription(package private) final StringThe announce URL for this tracker.(package private) intConsecutive failed requests to this tracker.(package private) final StringThe tracker's host name.(package private) longSeconds between announces, set by the tracker.(package private) final booleanTrue for the torrent's own announce list.(package private) final booleanTrue for a UDP tracker.(package private) longWhen the last request was sent.(package private) longWhen the last response arrived.(package private) longWhen the next scrape is due.(package private) final intThe UDP tracker's port.(package private) intFailed registrations with this tracker.(package private) intPeers returned by the last response.(package private) booleanSet once an announce has been sent.(package private) booleanSet to stop announcing to this tracker.(package private) StringThe last error message from this tracker.Constructor Summary
Method Summary
All Methods
Field Details
announce
The announce URL for this tracker.host
The tracker's host name.isPrimary
final boolean isPrimaryTrue for the torrent's own announce list.isUDP
final boolean isUDPTrue for a UDP tracker.port
final int portThe UDP tracker's port.interval
long intervalSeconds between announces, set by the tracker.lastRequestTime
long lastRequestTimeWhen the last request was sent.lastResponseTime
long lastResponseTimeWhen the last response arrived.nextScrapeTime
long nextScrapeTimeWhen the next scrape is due.trackerProblems
String trackerProblemsThe last error message from this tracker.stop
boolean stopSet to stop announcing to this tracker.started
boolean startedSet once an announce has been sent.registerFails
int registerFailsFailed registrations with this tracker.consecutiveFails
int consecutiveFailsConsecutive failed requests to this tracker.seenPeers
int seenPeersPeers returned by the last response.
Constructor Details
TCTracker
Create a tracker entry for the announce URL.- Parameters:
a- must be a valid http URL with a path, or a udp URL (path is ignored)p- true if primary
Method Details
reset
public void reset()Call before restarting.