Class TRTrackerDHTAnnouncerImpl
java.lang.Object
com.biglybt.core.tracker.client.impl.dht.TRTrackerDHTAnnouncerImpl
- All Implemented Interfaces:
TRTrackerAnnouncerHelper, TRTrackerAnnouncer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private final TRTrackerAnnouncerImpl.Helperprivate TRTrackerAnnouncerResponseImplprivate longstatic final LogIDsprivate final booleanprivate intprivate final TOTorrentprivate HashWrapperprivate StringFields inherited from interface 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
ConstructorsConstructorDescriptionTRTrackerDHTAnnouncerImpl(TOTorrent _torrent, String[] _networks, boolean _manual, TRTrackerAnnouncerImpl.Helper _helper) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidcomplete(boolean already_reported) voiddestroy()voidgenerateEvidence(IndentWriter writer) longintLast Update Time in secondslongbyte[]intgetPort()intintGets a delegate tracker peer source for reporting againstreturns a Map containing "bencoded" entries representing a cache of tracker responses.booleanisManual()booleanvoidThis method forces all listeners to get an explicit "urlChanged" event to get them to re-examine the trackervoidremoveFromTrackerResponseCache(String ip, int tcpPort) remove a specific entry from the cache if presentvoidvoidresetTrackerUrl(boolean shuffle) voidvoidvoidsetIPOverride(String override) voidsetRefreshDelayOverrides(int percentage) voidsets the response cache.voidsetTrackerURL(URL url) voidstop(boolean for_queue) voidupdate(boolean force)
-
Field Details
-
LOGID
-
torrent
-
torrent_hash
-
helper
-
data_peer_id
private byte[] data_peer_id -
tracker_status_str
-
last_update_time
private long last_update_time -
state
private int state -
last_response
-
manual
private final boolean manual
-
-
Constructor Details
-
TRTrackerDHTAnnouncerImpl
public TRTrackerDHTAnnouncerImpl(TOTorrent _torrent, String[] _networks, boolean _manual, TRTrackerAnnouncerImpl.Helper _helper) throws TRTrackerAnnouncerException - Throws:
TRTrackerAnnouncerException
-
-
Method Details
-
setAnnounceDataProvider
- Specified by:
setAnnounceDataProviderin interfaceTRTrackerAnnouncer
-
isManual
public boolean isManual()- Specified by:
isManualin interfaceTRTrackerAnnouncer
-
getTorrent
- Specified by:
getTorrentin interfaceTRTrackerAnnouncer
-
getTrackerURL
- Specified by:
getTrackerURLin interfaceTRTrackerAnnouncer
-
setTrackerURL
- Specified by:
setTrackerURLin interfaceTRTrackerAnnouncer
-
getAnnounceSets
- Specified by:
getAnnounceSetsin interfaceTRTrackerAnnouncerHelper
-
resetTrackerUrl
public void resetTrackerUrl(boolean shuffle) - Specified by:
resetTrackerUrlin interfaceTRTrackerAnnouncer
-
setIPOverride
- Specified by:
setIPOverridein interfaceTRTrackerAnnouncer
-
clearIPOverride
public void clearIPOverride()- Specified by:
clearIPOverridein interfaceTRTrackerAnnouncer
-
getPort
public int getPort() -
getPeerId
public byte[] getPeerId()- Specified by:
getPeerIdin interfaceTRTrackerAnnouncer
-
setRefreshDelayOverrides
public void setRefreshDelayOverrides(int percentage) - Specified by:
setRefreshDelayOverridesin interfaceTRTrackerAnnouncer
-
getTimeUntilNextUpdate
public int getTimeUntilNextUpdate()- Specified by:
getTimeUntilNextUpdatein interfaceTRTrackerAnnouncer- Specified by:
getTimeUntilNextUpdatein interfaceTRTrackerAnnouncerHelper
-
getLastUpdateTime
public int getLastUpdateTime()Description copied from interface:TRTrackerAnnouncerLast Update Time in seconds- Specified by:
getLastUpdateTimein interfaceTRTrackerAnnouncer
-
update
public void update(boolean force) - Specified by:
updatein interfaceTRTrackerAnnouncer
-
complete
public void complete(boolean already_reported) - Specified by:
completein interfaceTRTrackerAnnouncer
-
stop
public void stop(boolean for_queue) - Specified by:
stopin interfaceTRTrackerAnnouncer
-
destroy
public void destroy()- Specified by:
destroyin interfaceTRTrackerAnnouncer
-
getStatus
public int getStatus()- Specified by:
getStatusin interfaceTRTrackerAnnouncer
-
getStatusString
- Specified by:
getStatusStringin interfaceTRTrackerAnnouncer
-
getBestAnnouncer
- Specified by:
getBestAnnouncerin interfaceTRTrackerAnnouncer
-
getLastResponse
- Specified by:
getLastResponsein interfaceTRTrackerAnnouncer
-
isUpdating
public boolean isUpdating()- Specified by:
isUpdatingin interfaceTRTrackerAnnouncerHelper
-
getInterval
public long getInterval()- Specified by:
getIntervalin interfaceTRTrackerAnnouncerHelper
-
getMinInterval
public long getMinInterval()- Specified by:
getMinIntervalin interfaceTRTrackerAnnouncerHelper
-
refreshListeners
public void refreshListeners()Description copied from interface:TRTrackerAnnouncerThis method forces all listeners to get an explicit "urlChanged" event to get them to re-examine the tracker- Specified by:
refreshListenersin interfaceTRTrackerAnnouncer
-
setAnnounceResult
- Specified by:
setAnnounceResultin interfaceTRTrackerAnnouncer
-
addListener
- Specified by:
addListenerin interfaceTRTrackerAnnouncer
-
removeListener
- Specified by:
removeListenerin interfaceTRTrackerAnnouncer
-
setTrackerResponseCache
Description copied from interface:TRTrackerAnnouncersets the response cache. This may be used by the tracker client to return peer details when the tracker is offline- Specified by:
setTrackerResponseCachein interfaceTRTrackerAnnouncer- Parameters:
map-
-
removeFromTrackerResponseCache
Description copied from interface:TRTrackerAnnouncerremove a specific entry from the cache if present- Specified by:
removeFromTrackerResponseCachein interfaceTRTrackerAnnouncer- Parameters:
ip-tcpPort-
-
getTrackerResponseCache
Description copied from interface:TRTrackerAnnouncerreturns a Map containing "bencoded" entries representing a cache of tracker responses.- Specified by:
getTrackerResponseCachein interfaceTRTrackerAnnouncer- Returns:
-
getTrackerPeerSource
Description copied from interface:TRTrackerAnnouncerGets a delegate tracker peer source for reporting against- Specified by:
getTrackerPeerSourcein interfaceTRTrackerAnnouncer- Parameters:
set-- Returns:
-
getCacheTrackerPeerSource
- Specified by:
getCacheTrackerPeerSourcein interfaceTRTrackerAnnouncer
-
clearTrackerResponseCache
public void clearTrackerResponseCache()- Specified by:
clearTrackerResponseCachein interfaceTRTrackerAnnouncer
-
generateEvidence
- Specified by:
generateEvidencein interfaceTRTrackerAnnouncer
-