|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.core3.tracker.client.impl.bt.TRTrackerBTAnnouncerImpl
public class TRTrackerBTAnnouncerImpl
This class handles communication with the tracker
Field Summary | |
---|---|
static LogIDs |
LOGID
|
protected AEMonitor |
this_mon
|
protected int |
tracker_state
|
protected static Timer |
tracker_timer
|
static java.lang.String |
UDP_REALM
|
Fields inherited from interface org.gudy.azureus2.core3.tracker.client.TRTrackerAnnouncer |
---|
AZ_TRACKER_VERSION_1, AZ_TRACKER_VERSION_2, AZ_TRACKER_VERSION_3, AZ_TRACKER_VERSION_CURRENT, DEFAULT_PEERS_TO_CACHE, REFRESH_MINIMUM_SECS, TS_COMPLETED, TS_DOWNLOADING, TS_INITIALISED, TS_STOPPED |
Constructor Summary | |
---|---|
TRTrackerBTAnnouncerImpl(TOTorrent _torrent,
TOTorrentAnnounceURLSet[] _announce_urls,
java.lang.String[] _peer_networks,
boolean _manual,
TRTrackerAnnouncerImpl.Helper _helper)
|
Method Summary | |
---|---|
void |
addListener(TRTrackerAnnouncerListener l)
|
protected java.lang.String |
announceUDP(java.net.URL original_reqUrl,
java.io.ByteArrayOutputStream message,
boolean is_probe)
|
protected int |
calculateNumWant()
|
void |
clearIPOverride()
|
void |
cloneFrom(TRTrackerBTAnnouncerImpl other)
|
void |
complete(boolean already_reported)
|
protected TRTrackerAnnouncerResponseImpl |
completeSupport()
|
java.net.URL |
constructUrl(java.lang.String evt,
java.net.URL _url)
|
protected TRTrackerAnnouncerResponseImpl |
decodeTrackerResponse(java.net.URL url,
byte[] data)
|
void |
destroy()
|
protected java.lang.String |
exceptionToString(java.lang.Throwable e)
|
void |
generateEvidence(IndentWriter writer)
|
protected long |
getAdjustedSecsToWait()
|
TOTorrentAnnounceURLSet[] |
getAnnounceSets()
|
TRTrackerAnnouncer |
getBestAnnouncer()
|
TrackerPeerSource |
getCacheTrackerPeerSource()
|
protected int |
getErrorRetryInterval()
Retrieve the retry interval to use on announce errors. |
long |
getInterval()
|
TRTrackerAnnouncerResponse |
getLastResponse()
|
int |
getLastUpdateTime()
Last Update Time in seconds |
protected long |
getLongURLParam(java.lang.String url,
java.lang.String param)
|
long |
getMinInterval()
|
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()
|
protected java.lang.String |
getURLParam(java.lang.String url,
java.lang.String param)
|
protected void |
informURLChange(java.net.URL old_url,
java.net.URL new_url,
boolean explicit)
|
protected void |
informURLRefresh()
|
boolean |
isManual()
|
boolean |
isUpdating()
|
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 tcpPort)
remove a specific entry from the cache if present |
void |
removeListener(TRTrackerAnnouncerListener l)
|
protected void |
requestUpdate()
|
protected long |
requestUpdateSupport()
|
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 new_url)
|
protected TRTrackerAnnouncerResponseImpl |
startSupport()
|
void |
stop(boolean for_queue)
|
protected TRTrackerAnnouncerResponseImpl |
stopSupport()
|
protected java.lang.String |
trackerURLListToString()
|
void |
update(boolean force)
|
protected TRTrackerAnnouncerResponseImpl |
updateSupport()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final LogIDs LOGID
protected static final Timer tracker_timer
public static final java.lang.String UDP_REALM
protected int tracker_state
protected final AEMonitor this_mon
Constructor Detail |
---|
public TRTrackerBTAnnouncerImpl(TOTorrent _torrent, TOTorrentAnnounceURLSet[] _announce_urls, java.lang.String[] _peer_networks, boolean _manual, TRTrackerAnnouncerImpl.Helper _helper) throws TRTrackerAnnouncerException
TRTrackerAnnouncerException
Method Detail |
---|
public void cloneFrom(TRTrackerBTAnnouncerImpl other)
protected long getAdjustedSecsToWait()
public int getStatus()
getStatus
in interface TRTrackerAnnouncer
public java.lang.String getStatusString()
getStatusString
in interface TRTrackerAnnouncer
public TRTrackerAnnouncer getBestAnnouncer()
getBestAnnouncer
in interface TRTrackerAnnouncer
public void setRefreshDelayOverrides(int percentage)
setRefreshDelayOverrides
in interface TRTrackerAnnouncer
public boolean isUpdating()
isUpdating
in interface TRTrackerAnnouncerHelper
public long getInterval()
getInterval
in interface TRTrackerAnnouncerHelper
public long getMinInterval()
getMinInterval
in interface TRTrackerAnnouncerHelper
public int getTimeUntilNextUpdate()
getTimeUntilNextUpdate
in interface TRTrackerAnnouncerHelper
getTimeUntilNextUpdate
in interface TRTrackerAnnouncer
public int getLastUpdateTime()
TRTrackerAnnouncer
getLastUpdateTime
in interface TRTrackerAnnouncer
public void update(boolean force)
update
in interface TRTrackerAnnouncer
public void complete(boolean already_reported)
complete
in interface TRTrackerAnnouncer
public void stop(boolean for_queue)
stop
in interface TRTrackerAnnouncer
protected void requestUpdate()
protected long requestUpdateSupport()
protected TRTrackerAnnouncerResponseImpl startSupport()
protected TRTrackerAnnouncerResponseImpl completeSupport()
protected TRTrackerAnnouncerResponseImpl stopSupport()
protected TRTrackerAnnouncerResponseImpl updateSupport()
protected java.lang.String announceUDP(java.net.URL original_reqUrl, java.io.ByteArrayOutputStream message, boolean is_probe) throws java.io.IOException
java.io.IOException
protected long getLongURLParam(java.lang.String url, java.lang.String param)
protected java.lang.String getURLParam(java.lang.String url, java.lang.String param)
protected java.lang.String exceptionToString(java.lang.Throwable e)
public java.net.URL constructUrl(java.lang.String evt, java.net.URL _url) throws java.lang.Exception
java.lang.Exception
protected int calculateNumWant()
public byte[] getPeerId()
getPeerId
in interface TRTrackerAnnouncer
public void setAnnounceDataProvider(TRTrackerAnnouncerDataProvider _provider)
setAnnounceDataProvider
in interface TRTrackerAnnouncer
public TOTorrent getTorrent()
getTorrent
in interface TRTrackerAnnouncer
public java.net.URL getTrackerURL()
getTrackerURL
in interface TRTrackerAnnouncer
public void setTrackerURL(java.net.URL new_url)
setTrackerURL
in interface TRTrackerAnnouncer
public TOTorrentAnnounceURLSet[] getAnnounceSets()
getAnnounceSets
in interface TRTrackerAnnouncerHelper
public void resetTrackerUrl(boolean shuffle)
resetTrackerUrl
in interface TRTrackerAnnouncer
public void refreshListeners()
TRTrackerAnnouncer
refreshListeners
in interface TRTrackerAnnouncer
public void setIPOverride(java.lang.String override)
setIPOverride
in interface TRTrackerAnnouncer
public void clearIPOverride()
clearIPOverride
in interface TRTrackerAnnouncer
protected java.lang.String trackerURLListToString()
protected TRTrackerAnnouncerResponseImpl decodeTrackerResponse(java.net.URL url, byte[] data)
protected void informURLChange(java.net.URL old_url, java.net.URL new_url, boolean explicit)
protected void informURLRefresh()
public TRTrackerAnnouncerResponse getLastResponse()
getLastResponse
in interface TRTrackerAnnouncer
public boolean isManual()
isManual
in interface TRTrackerAnnouncer
public void destroy()
destroy
in interface TRTrackerAnnouncer
protected int getErrorRetryInterval()
public void setAnnounceResult(DownloadAnnounceResult result)
setAnnounceResult
in interface TRTrackerAnnouncer
public void addListener(TRTrackerAnnouncerListener l)
addListener
in interface TRTrackerAnnouncer
public void removeListener(TRTrackerAnnouncerListener l)
removeListener
in interface TRTrackerAnnouncer
public void setTrackerResponseCache(java.util.Map map)
TRTrackerAnnouncer
setTrackerResponseCache
in interface TRTrackerAnnouncer
public void removeFromTrackerResponseCache(java.lang.String ip, int tcpPort)
TRTrackerAnnouncer
removeFromTrackerResponseCache
in interface TRTrackerAnnouncer
public java.util.Map getTrackerResponseCache()
TRTrackerAnnouncer
getTrackerResponseCache
in interface TRTrackerAnnouncer
public TrackerPeerSource getTrackerPeerSource(TOTorrentAnnounceURLSet set)
TRTrackerAnnouncer
getTrackerPeerSource
in interface TRTrackerAnnouncer
public TrackerPeerSource getCacheTrackerPeerSource()
getCacheTrackerPeerSource
in interface TRTrackerAnnouncer
public void generateEvidence(IndentWriter writer)
generateEvidence
in interface TRTrackerAnnouncer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |