Class TRTrackerServerImpl
java.lang.Object
com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
- All Implemented Interfaces:
TRTrackerServer
- Direct Known Subclasses:
TRTrackerServerDHT, TRTrackerServerTCP, TRTrackerServerUDP
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic intstatic intprivate final booleanprivate final List<TRTrackerServerAuthenticationListener> private Setprivate static final AEMonitorstatic final intprivate booleanprivate final COConfigurationListenerprivate longprivate intprivate final intprivate longprivate longprivate booleanprivate booleanstatic booleanprivate final IpFilterprivate booleanprivate booleanprivate booleanprivate static final Mapprotected final CopyOnWriteList<TRTrackerServerListener> protected final CopyOnWriteList<TRTrackerServerListener2> static intstatic intprivate final Stringprivate byte[]private Stringstatic String[]static Stringprivate final Vector<TRTrackerServerRequestListener> static booleanstatic final intstatic final intprivate final booleanstatic intstatic intstatic booleanprivate final TRTrackerServerStatsImplstatic booleanprotected AEMonitorstatic final intprivate static final Mapprivate booleanprivate booleanprivate booleanFields inherited from interface TRTrackerServer
DEFAULT_ANNOUNCE_CACHE_PEER_THRESHOLD, DEFAULT_ANNOUNCE_CACHE_PERIOD, DEFAULT_INC_BY, DEFAULT_INC_PER, DEFAULT_MAX_RETRY_DELAY, DEFAULT_MIN_RETRY_DELAY, DEFAULT_NAME, DEFAULT_NAT_CHECK_SECS, DEFAULT_SCRAPE_CACHE_PERIOD, DEFAULT_SCRAPE_RETRY_PERCENTAGE, DEFAULT_TRACKER_PORT, DEFAULT_TRACKER_PORT_SSL -
Constructor Summary
ConstructorsConstructorDescriptionTRTrackerServerImpl(String _name, boolean _apply_ip_filter, boolean _start_up_ready, Map<String, Object> _properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLink(String link, TRTrackerServerTorrent target) voidvoidvoidvoidclose()protected abstract voidvoiddeny(byte[] _hash, boolean _explicit) protected voidprotected static booleanprotected static intprotected static intlongprotected Setprotected static intprotected static intlonglonggetName()byte[]getPeers(byte[] hash) protected static String[]protected static intlonglongprotected static intprotected static booleangetStats()getStats(byte[] hash) getTorrent(byte[] hash) getTorrent(String link) intbooleanbooleanbooleanbooleanstatic booleanprotected booleanisIPFiltered(String ip) booleanbooleanbooleanisKnownTorrent(byte[] hash) final booleanisReady()booleanbooleanbooleanbooleanperformExternalAuthorisation(InetSocketAddress remote_ip, String headers, URL resource, String user, String password) byte[]performExternalAuthorisation(URL resource, String user) voidpostProcess(TRTrackerServerPeer peer, TRTrackerServerTorrentImpl torrent, int type, String request, Map response) voidpreProcess(TRTrackerServerPeer peer, TRTrackerServerTorrent torrent, int type, String request, Map response) protected static voidprotected voidvoidvoidremoveLink(String link, TRTrackerServerTorrent target) voidvoidvoidvoidsetBiasedPeers(Set peers) voidsetEnabled(boolean e) voidsetEnableKeepAlive(boolean enable) voidsetReady()static booleanprotected voidvoidupdateStats(int request_type, TRTrackerServerTorrentImpl torrent, int bytes_in, int bytes_out) protected voidupdateTime(int request_type, long time) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TRTrackerServer
getBindIP, getHost, getPort, isSSL
-
Field Details
-
RETRY_MINIMUM_SECS
public static final int RETRY_MINIMUM_SECS- See Also:
-
RETRY_MINIMUM_MILLIS
public static final int RETRY_MINIMUM_MILLIS- See Also:
-
CLIENT_TIMEOUT_MULTIPLIER
public static final int CLIENT_TIMEOUT_MULTIPLIER- See Also:
-
TIMEOUT_CHECK
public static final int TIMEOUT_CHECK- See Also:
-
max_peers_to_send
public static int max_peers_to_send -
send_peer_ids
public static boolean send_peer_ids -
announce_cache_period
public static int announce_cache_period -
scrape_cache_period
public static int scrape_cache_period -
announce_cache_threshold
public static int announce_cache_threshold -
max_seed_retention
public static int max_seed_retention -
seed_limit
public static int seed_limit -
full_scrape_enable
public static boolean full_scrape_enable -
restrict_non_blocking_requests
public static boolean restrict_non_blocking_requests -
all_networks_permitted
public static boolean all_networks_permitted -
permitted_networks
-
support_experimental_extensions
public static boolean support_experimental_extensions -
redirect_on_not_found
-
banned_clients
-
torrent_map
-
link_map
-
class_mon
-
ip_filter
-
current_announce_retry_interval
private long current_announce_retry_interval -
current_scrape_retry_interval
private long current_scrape_retry_interval -
current_total_clients
private long current_total_clients -
current_min_poll_interval
private int current_min_poll_interval -
current_min_seed_announce_mult
private final int current_min_seed_announce_mult -
stats
-
name
-
apply_ip_filter
private final boolean apply_ip_filter -
properties
-
reverse_proxy
private final boolean reverse_proxy -
web_password_enabled
private boolean web_password_enabled -
web_password_https_only
private boolean web_password_https_only -
tracker_password_enabled
private boolean tracker_password_enabled -
password_user
-
password_pw
private byte[] password_pw -
compact_enabled
private boolean compact_enabled -
key_enabled
private boolean key_enabled -
enabled
private boolean enabled -
keep_alive_enabled
private boolean keep_alive_enabled -
listeners
-
listeners2
-
auth_listeners
-
request_listeners
-
this_mon
-
config_listener
-
destroyed
private boolean destroyed -
biased_peers
-
is_ready
private boolean is_ready
-
-
Constructor Details
-
TRTrackerServerImpl
-
-
Method Details
-
readConfig
protected static void readConfig() -
getSendPeerIds
protected static boolean getSendPeerIds() -
getMaxPeersToSend
protected static int getMaxPeersToSend() -
getScrapeCachePeriod
protected static int getScrapeCachePeriod() -
getAnnounceCachePeriod
protected static int getAnnounceCachePeriod() -
getAnnounceCachePeerThreshold
protected static int getAnnounceCachePeerThreshold() -
getMaxSeedRetention
protected static int getMaxSeedRetention() -
getSeedLimit
protected static int getSeedLimit() -
isFullScrapeEnabled
public static boolean isFullScrapeEnabled() -
getAllNetworksSupported
protected static boolean getAllNetworksSupported() -
getPermittedNetworks
-
supportsExtensions
public static boolean supportsExtensions() -
readConfigSettings
protected void readConfigSettings() -
setReady
public void setReady()- Specified by:
setReadyin interfaceTRTrackerServer
-
isReady
public final boolean isReady() -
setEnabled
public void setEnabled(boolean e) - Specified by:
setEnabledin interfaceTRTrackerServer
-
isEnabled
public boolean isEnabled() -
setEnableKeepAlive
public void setEnableKeepAlive(boolean enable) - Specified by:
setEnableKeepAlivein interfaceTRTrackerServer
-
isKeepAliveEnabled
public boolean isKeepAliveEnabled() -
isIPFiltered
-
addLink
-
removeLink
-
setBiasedPeers
- Specified by:
setBiasedPeersin interfaceTRTrackerServer
-
getBiasedPeers
-
isWebPasswordEnabled
public boolean isWebPasswordEnabled() -
isTrackerPasswordEnabled
public boolean isTrackerPasswordEnabled() -
isWebPasswordHTTPSOnly
public boolean isWebPasswordHTTPSOnly() -
hasExternalAuthorisation
public boolean hasExternalAuthorisation() -
hasInternalAuthorisation
public boolean hasInternalAuthorisation() -
performExternalAuthorisation
public boolean performExternalAuthorisation(InetSocketAddress remote_ip, String headers, URL resource, String user, String password) -
performExternalAuthorisation
-
getName
- Specified by:
getNamein interfaceTRTrackerServer
-
isCompactEnabled
public boolean isCompactEnabled() -
isKeyEnabled
public boolean isKeyEnabled() -
getUsername
-
getPassword
public byte[] getPassword() -
getMinAnnounceRetryInterval
public long getMinAnnounceRetryInterval() -
getAnnounceRetryInterval
-
getSeedAnnounceIntervalMultiplier
public long getSeedAnnounceIntervalMultiplier() -
getScrapeRetryInterval
-
getMinScrapeRetryInterval
public long getMinScrapeRetryInterval() -
getStats
- Specified by:
getStatsin interfaceTRTrackerServer
-
updateStats
public void updateStats(int request_type, TRTrackerServerTorrentImpl torrent, int bytes_in, int bytes_out) -
updateTime
protected void updateTime(int request_type, long time) -
timerLoop
protected void timerLoop() -
permit
public TRTrackerServerTorrent permit(String _originator, byte[] _hash, boolean _explicit) throws TRTrackerServerException - Specified by:
permitin interfaceTRTrackerServer- Throws:
TRTrackerServerException
-
permit
public TRTrackerServerTorrent permit(String _originator, byte[] _hash, boolean _explicit, boolean _enabled) throws TRTrackerServerException - Specified by:
permitin interfaceTRTrackerServer- Throws:
TRTrackerServerException
-
deny
- Specified by:
denyin interfaceTRTrackerServer- Throws:
TRTrackerServerException
-
isKnownTorrent
public boolean isKnownTorrent(byte[] hash) -
getTorrent
-
getTorrent
-
getTorrents
-
getTorrentCount
public int getTorrentCount() -
getStats
- Specified by:
getStatsin interfaceTRTrackerServer
-
getPeers
- Specified by:
getPeersin interfaceTRTrackerServer
-
addListener
- Specified by:
addListenerin interfaceTRTrackerServer
-
removeListener
- Specified by:
removeListenerin interfaceTRTrackerServer
-
addListener2
- Specified by:
addListener2in interfaceTRTrackerServer
-
removeListener2
- Specified by:
removeListener2in interfaceTRTrackerServer
-
addAuthenticationListener
- Specified by:
addAuthenticationListenerin interfaceTRTrackerServer
-
removeAuthenticationListener
- Specified by:
removeAuthenticationListenerin interfaceTRTrackerServer
-
preProcess
public void preProcess(TRTrackerServerPeer peer, TRTrackerServerTorrent torrent, int type, String request, Map response) throws TRTrackerServerException - Throws:
TRTrackerServerException
-
postProcess
public void postProcess(TRTrackerServerPeer peer, TRTrackerServerTorrentImpl torrent, int type, String request, Map response) throws TRTrackerServerException - Throws:
TRTrackerServerException
-
addRequestListener
- Specified by:
addRequestListenerin interfaceTRTrackerServer
-
removeRequestListener
- Specified by:
removeRequestListenerin interfaceTRTrackerServer
-
close
public void close()- Specified by:
closein interfaceTRTrackerServer
-
closeSupport
protected abstract void closeSupport() -
destroySupport
protected void destroySupport()
-