java.lang.Object
org.klomp.snark.TrackerClient.TCTracker
Enclosing class:
TrackerClient

private static class TrackerClient.TCTrackerextends Object
One tracker's URL and per-tracker state.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final String
    The announce URL for this tracker.
    (package private) int
    Consecutive failed requests to this tracker.
    (package private) final String
    The tracker's host name.
    (package private) long
    Seconds between announces, set by the tracker.
    (package private) final boolean
    True for the torrent's own announce list.
    (package private) final boolean
    True for a UDP tracker.
    (package private) long
    When the last request was sent.
    (package private) long
    When the last response arrived.
    (package private) long
    When the next scrape is due.
    (package private) final int
    The UDP tracker's port.
    (package private) int
    Failed registrations with this tracker.
    (package private) int
    Peers returned by the last response.
    (package private) boolean
    Set once an announce has been sent.
    (package private) boolean
    Set to stop announcing to this tracker.
    (package private) String
    The last error message from this tracker.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TCTracker(String a, boolean p)
    Create a tracker entry for the announce URL.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    void
    Call before restarting.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • announce

      final String announce
      The announce URL for this tracker.
    • host

      final String host
      The tracker's host name.
    • isPrimary

      final boolean isPrimary
      True for the torrent's own announce list.
    • isUDP

      final boolean isUDP
      True for a UDP tracker.
    • port

      final int port
      The UDP tracker's port.
    • interval

      long interval
      Seconds between announces, set by the tracker.
    • lastRequestTime

      long lastRequestTime
      When the last request was sent.
    • lastResponseTime

      long lastResponseTime
      When the last response arrived.
    • nextScrapeTime

      long nextScrapeTime
      When the next scrape is due.
    • trackerProblems

      String trackerProblems
      The last error message from this tracker.
    • stop

      boolean stop
      Set to stop announcing to this tracker.
    • started

      boolean started
      Set once an announce has been sent.
    • registerFails

      int registerFails
      Failed registrations with this tracker.
    • consecutiveFails

      int consecutiveFails
      Consecutive failed requests to this tracker.
    • seenPeers

      int seenPeers
      Peers returned by the last response.
  • Constructor Details

    • TCTracker

      public TCTracker(String a, boolean p)
      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.