org.gudy.azureus2.core3.tracker.client
Interface TRTrackerAnnouncer

All Known Subinterfaces:
TRTrackerAnnouncerHelper
All Known Implementing Classes:
TRTrackerAnnouncerImpl, TRTrackerAnnouncerMuxer, TRTrackerBTAnnouncerImpl, TRTrackerDHTAnnouncerImpl

public interface TRTrackerAnnouncer


Field Summary
static byte AZ_TRACKER_VERSION_1
           
static byte AZ_TRACKER_VERSION_2
           
static byte AZ_TRACKER_VERSION_3
           
static byte AZ_TRACKER_VERSION_CURRENT
           
static int DEFAULT_PEERS_TO_CACHE
           
static int REFRESH_MINIMUM_SECS
           
static int TS_COMPLETED
           
static int TS_DOWNLOADING
           
static int TS_INITIALISED
           
static int TS_STOPPED
           
 
Method Summary
 void addListener(TRTrackerAnnouncerListener l)
           
 void clearIPOverride()
           
 void complete(boolean already_reported)
           
 void destroy()
           
 void generateEvidence(IndentWriter writer)
           
 TRTrackerAnnouncer getBestAnnouncer()
           
 TrackerPeerSource getCacheTrackerPeerSource()
           
 TRTrackerAnnouncerResponse getLastResponse()
           
 int getLastUpdateTime()
          Last Update Time in seconds
 byte[] getPeerId()
           
 int getStatus()
           
 java.lang.String getStatusString()
           
 int getTimeUntilNextUpdate()
           
 TOTorrent getTorrent()
           
 TrackerPeerSource getTrackerPeerSource(TOTorrentAnnounceURLSet set)
          Gets a delegate tracker peer source for reporting against
 java.util.Map getTrackerResponseCache()
          returns a Map containing "bencoded" entries representing a cache of tracker responses.
 java.net.URL getTrackerURL()
           
 boolean isManual()
           
 void refreshListeners()
          This method forces all listeners to get an explicit "urlChanged" event to get them to re-examine the tracker
 void removeFromTrackerResponseCache(java.lang.String ip, int tcp_port)
          remove a specific entry from the cache if present
 void removeListener(TRTrackerAnnouncerListener l)
           
 void resetTrackerUrl(boolean shuffle)
           
 void setAnnounceDataProvider(TRTrackerAnnouncerDataProvider provider)
           
 void setAnnounceResult(DownloadAnnounceResult result)
           
 void setIPOverride(java.lang.String override)
           
 void setRefreshDelayOverrides(int percentage)
           
 void setTrackerResponseCache(java.util.Map map)
          sets the response cache.
 void setTrackerURL(java.net.URL url)
           
 void stop(boolean for_queue)
           
 void update(boolean force)
           
 

Field Detail

AZ_TRACKER_VERSION_1

static final byte AZ_TRACKER_VERSION_1
See Also:
Constant Field Values

AZ_TRACKER_VERSION_2

static final byte AZ_TRACKER_VERSION_2
See Also:
Constant Field Values

AZ_TRACKER_VERSION_3

static final byte AZ_TRACKER_VERSION_3
See Also:
Constant Field Values

AZ_TRACKER_VERSION_CURRENT

static final byte AZ_TRACKER_VERSION_CURRENT
See Also:
Constant Field Values

REFRESH_MINIMUM_SECS

static final int REFRESH_MINIMUM_SECS
See Also:
Constant Field Values

DEFAULT_PEERS_TO_CACHE

static final int DEFAULT_PEERS_TO_CACHE
See Also:
Constant Field Values

TS_INITIALISED

static final int TS_INITIALISED
See Also:
Constant Field Values

TS_DOWNLOADING

static final int TS_DOWNLOADING
See Also:
Constant Field Values

TS_COMPLETED

static final int TS_COMPLETED
See Also:
Constant Field Values

TS_STOPPED

static final int TS_STOPPED
See Also:
Constant Field Values
Method Detail

setAnnounceDataProvider

void setAnnounceDataProvider(TRTrackerAnnouncerDataProvider provider)

getTorrent

TOTorrent getTorrent()

getTrackerURL

java.net.URL getTrackerURL()

setTrackerURL

void setTrackerURL(java.net.URL url)

resetTrackerUrl

void resetTrackerUrl(boolean shuffle)

setIPOverride

void setIPOverride(java.lang.String override)

clearIPOverride

void clearIPOverride()

getPeerId

byte[] getPeerId()

setRefreshDelayOverrides

void setRefreshDelayOverrides(int percentage)

getTimeUntilNextUpdate

int getTimeUntilNextUpdate()

getLastUpdateTime

int getLastUpdateTime()
Last Update Time in seconds


update

void update(boolean force)

complete

void complete(boolean already_reported)

stop

void stop(boolean for_queue)

destroy

void destroy()

getStatus

int getStatus()

isManual

boolean isManual()

getStatusString

java.lang.String getStatusString()

getBestAnnouncer

TRTrackerAnnouncer getBestAnnouncer()

getLastResponse

TRTrackerAnnouncerResponse getLastResponse()

getTrackerResponseCache

java.util.Map getTrackerResponseCache()
returns a Map containing "bencoded" entries representing a cache of tracker responses.

Returns:

setTrackerResponseCache

void setTrackerResponseCache(java.util.Map map)
sets the response cache. This may be used by the tracker client to return peer details when the tracker is offline

Parameters:
map -

removeFromTrackerResponseCache

void removeFromTrackerResponseCache(java.lang.String ip,
                                    int tcp_port)
remove a specific entry from the cache if present

Parameters:
ip -
tcp_port -

getTrackerPeerSource

TrackerPeerSource getTrackerPeerSource(TOTorrentAnnounceURLSet set)
Gets a delegate tracker peer source for reporting against

Parameters:
set -
Returns:

getCacheTrackerPeerSource

TrackerPeerSource getCacheTrackerPeerSource()

refreshListeners

void refreshListeners()
This method forces all listeners to get an explicit "urlChanged" event to get them to re-examine the tracker


setAnnounceResult

void setAnnounceResult(DownloadAnnounceResult result)

addListener

void addListener(TRTrackerAnnouncerListener l)

removeListener

void removeListener(TRTrackerAnnouncerListener l)

generateEvidence

void generateEvidence(IndentWriter writer)