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.Helper
private TRTrackerAnnouncerResponseImpl
private long
static final LogIDs
private final boolean
private int
private final TOTorrent
private HashWrapper
private String
Fields inherited from interface com.biglybt.core.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
ConstructorsConstructorDescriptionTRTrackerDHTAnnouncerImpl
(TOTorrent _torrent, String[] _networks, boolean _manual, TRTrackerAnnouncerImpl.Helper _helper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
complete
(boolean already_reported) void
destroy()
void
generateEvidence
(IndentWriter writer) long
int
Last Update Time in secondslong
byte[]
int
getPort()
int
int
Gets a delegate tracker peer source for reporting againstreturns a Map containing "bencoded" entries representing a cache of tracker responses.boolean
isManual()
boolean
void
This method forces all listeners to get an explicit "urlChanged" event to get them to re-examine the trackervoid
removeFromTrackerResponseCache
(String ip, int tcpPort) remove a specific entry from the cache if presentvoid
void
resetTrackerUrl
(boolean shuffle) void
void
void
setIPOverride
(String override) void
setRefreshDelayOverrides
(int percentage) void
sets the response cache.void
setTrackerURL
(URL url) void
stop
(boolean for_queue) void
update
(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:
setAnnounceDataProvider
in interfaceTRTrackerAnnouncer
-
isManual
public boolean isManual()- Specified by:
isManual
in interfaceTRTrackerAnnouncer
-
getTorrent
- Specified by:
getTorrent
in interfaceTRTrackerAnnouncer
-
getTrackerURL
- Specified by:
getTrackerURL
in interfaceTRTrackerAnnouncer
-
setTrackerURL
- Specified by:
setTrackerURL
in interfaceTRTrackerAnnouncer
-
getAnnounceSets
- Specified by:
getAnnounceSets
in interfaceTRTrackerAnnouncerHelper
-
resetTrackerUrl
public void resetTrackerUrl(boolean shuffle) - Specified by:
resetTrackerUrl
in interfaceTRTrackerAnnouncer
-
setIPOverride
- Specified by:
setIPOverride
in interfaceTRTrackerAnnouncer
-
clearIPOverride
public void clearIPOverride()- Specified by:
clearIPOverride
in interfaceTRTrackerAnnouncer
-
getPort
public int getPort() -
getPeerId
public byte[] getPeerId()- Specified by:
getPeerId
in interfaceTRTrackerAnnouncer
-
setRefreshDelayOverrides
public void setRefreshDelayOverrides(int percentage) - Specified by:
setRefreshDelayOverrides
in interfaceTRTrackerAnnouncer
-
getTimeUntilNextUpdate
public int getTimeUntilNextUpdate()- Specified by:
getTimeUntilNextUpdate
in interfaceTRTrackerAnnouncer
- Specified by:
getTimeUntilNextUpdate
in interfaceTRTrackerAnnouncerHelper
-
getLastUpdateTime
public int getLastUpdateTime()Description copied from interface:TRTrackerAnnouncer
Last Update Time in seconds- Specified by:
getLastUpdateTime
in interfaceTRTrackerAnnouncer
-
update
public void update(boolean force) - Specified by:
update
in interfaceTRTrackerAnnouncer
-
complete
public void complete(boolean already_reported) - Specified by:
complete
in interfaceTRTrackerAnnouncer
-
stop
public void stop(boolean for_queue) - Specified by:
stop
in interfaceTRTrackerAnnouncer
-
destroy
public void destroy()- Specified by:
destroy
in interfaceTRTrackerAnnouncer
-
getStatus
public int getStatus()- Specified by:
getStatus
in interfaceTRTrackerAnnouncer
-
getStatusString
- Specified by:
getStatusString
in interfaceTRTrackerAnnouncer
-
getBestAnnouncer
- Specified by:
getBestAnnouncer
in interfaceTRTrackerAnnouncer
-
getLastResponse
- Specified by:
getLastResponse
in interfaceTRTrackerAnnouncer
-
isUpdating
public boolean isUpdating()- Specified by:
isUpdating
in interfaceTRTrackerAnnouncerHelper
-
getInterval
public long getInterval()- Specified by:
getInterval
in interfaceTRTrackerAnnouncerHelper
-
getMinInterval
public long getMinInterval()- Specified by:
getMinInterval
in interfaceTRTrackerAnnouncerHelper
-
refreshListeners
public void refreshListeners()Description copied from interface:TRTrackerAnnouncer
This method forces all listeners to get an explicit "urlChanged" event to get them to re-examine the tracker- Specified by:
refreshListeners
in interfaceTRTrackerAnnouncer
-
setAnnounceResult
- Specified by:
setAnnounceResult
in interfaceTRTrackerAnnouncer
-
addListener
- Specified by:
addListener
in interfaceTRTrackerAnnouncer
-
removeListener
- Specified by:
removeListener
in interfaceTRTrackerAnnouncer
-
setTrackerResponseCache
Description copied from interface:TRTrackerAnnouncer
sets the response cache. This may be used by the tracker client to return peer details when the tracker is offline- Specified by:
setTrackerResponseCache
in interfaceTRTrackerAnnouncer
-
removeFromTrackerResponseCache
Description copied from interface:TRTrackerAnnouncer
remove a specific entry from the cache if present- Specified by:
removeFromTrackerResponseCache
in interfaceTRTrackerAnnouncer
-
getTrackerResponseCache
Description copied from interface:TRTrackerAnnouncer
returns a Map containing "bencoded" entries representing a cache of tracker responses.- Specified by:
getTrackerResponseCache
in interfaceTRTrackerAnnouncer
- Returns:
-
getTrackerPeerSource
Description copied from interface:TRTrackerAnnouncer
Gets a delegate tracker peer source for reporting against- Specified by:
getTrackerPeerSource
in interfaceTRTrackerAnnouncer
- Returns:
-
getCacheTrackerPeerSource
- Specified by:
getCacheTrackerPeerSource
in interfaceTRTrackerAnnouncer
-
generateEvidence
- Specified by:
generateEvidence
in interfaceTRTrackerAnnouncer
-