org.gudy.azureus2.core3.tracker.client.impl
Class TRTrackerAnnouncerImpl
java.lang.Object
org.gudy.azureus2.core3.tracker.client.impl.TRTrackerAnnouncerImpl
- All Implemented Interfaces:
- TRTrackerAnnouncer
- Direct Known Subclasses:
- TRTrackerAnnouncerMuxer
public abstract class TRTrackerAnnouncerImpl
- extends java.lang.Object
- implements TRTrackerAnnouncer
- Author:
- parg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.gudy.azureus2.core3.tracker.client.TRTrackerAnnouncer |
clearIPOverride, complete, destroy, generateEvidence, getBestAnnouncer, getLastResponse, getLastUpdateTime, getStatus, getStatusString, getTimeUntilNextUpdate, getTrackerPeerSource, getTrackerURL, isManual, refreshListeners, resetTrackerUrl, setAnnounceDataProvider, setAnnounceResult, setIPOverride, setRefreshDelayOverrides, setTrackerURL, stop, update |
LOGID
public static final LogIDs LOGID
LDT_TRACKER_RESPONSE
protected static final int LDT_TRACKER_RESPONSE
- See Also:
- Constant Field Values
LDT_URL_CHANGED
protected static final int LDT_URL_CHANGED
- See Also:
- Constant Field Values
LDT_URL_REFRESH
protected static final int LDT_URL_REFRESH
- See Also:
- Constant Field Values
listeners
protected final ListenerManager<TRTrackerAnnouncerListener> listeners
TRTrackerAnnouncerImpl
protected TRTrackerAnnouncerImpl(TOTorrent _torrent)
throws TRTrackerAnnouncerException
- Throws:
TRTrackerAnnouncerException
getTorrent
public TOTorrent getTorrent()
- Specified by:
getTorrent
in interface TRTrackerAnnouncer
getHelper
public TRTrackerAnnouncerImpl.Helper getHelper()
getPeerId
public byte[] getPeerId()
- Specified by:
getPeerId
in interface TRTrackerAnnouncer
getAnonymousPeerId
public static byte[] getAnonymousPeerId(java.lang.String my_ip,
int my_port)
getTrackerResponseCache
public java.util.Map getTrackerResponseCache()
- Description copied from interface:
TRTrackerAnnouncer
- returns a Map containing "bencoded" entries representing a cache of tracker
responses.
- Specified by:
getTrackerResponseCache
in interface TRTrackerAnnouncer
- Returns:
setTrackerResponseCache
public void setTrackerResponseCache(java.util.Map map)
- 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 interface TRTrackerAnnouncer
exportTrackerCache
protected java.util.Map exportTrackerCache()
importTrackerCache
protected int importTrackerCache(java.util.Map map)
addToTrackerCache
protected void addToTrackerCache(TRTrackerAnnouncerResponsePeerImpl[] peers)
removeFromTrackerResponseCache
public void removeFromTrackerResponseCache(java.lang.String ip,
int tcp_port)
- Description copied from interface:
TRTrackerAnnouncer
- remove a specific entry from the cache if present
- Specified by:
removeFromTrackerResponseCache
in interface TRTrackerAnnouncer
mergeResponseCache
public static java.util.Map mergeResponseCache(java.util.Map map1,
java.util.Map map2)
getPeerCacheLimit
protected abstract int getPeerCacheLimit()
getPeersFromCache
protected TRTrackerAnnouncerResponsePeer[] getPeersFromCache(int num_want)
getCacheTrackerPeerSource
public TrackerPeerSource getCacheTrackerPeerSource()
- Specified by:
getCacheTrackerPeerSource
in interface TRTrackerAnnouncer
informResponse
protected void informResponse(TRTrackerAnnouncerHelper helper,
TRTrackerAnnouncerResponse response)
informURLRefresh
protected void informURLRefresh()
addListener
public void addListener(TRTrackerAnnouncerListener l)
- Specified by:
addListener
in interface TRTrackerAnnouncer
removeListener
public void removeListener(TRTrackerAnnouncerListener l)
- Specified by:
removeListener
in interface TRTrackerAnnouncer