Class TRTrackerServerTCP
- java.lang.Object
-
- com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
-
- com.biglybt.core.tracker.server.impl.tcp.TRTrackerServerTCP
-
- All Implemented Interfaces:
TRTrackerServer
- Direct Known Subclasses:
TRBlockingServer
,TRNonBlockingServer
public abstract class TRTrackerServerTCP extends TRTrackerServerImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TRTrackerServerTCP.DOSEntry
-
Field Summary
Fields Modifier and Type Field Description private boolean
apply_ip_filter
protected static AEMonitor
class_mon
(package private) int
dos_check_count
(package private) static int
DOS_CHECK_DEAD_WOOD_COUNT
(package private) java.util.List
dos_list
protected static java.io.File
dos_log_file
(package private) java.util.Map
DOS_map
(package private) static int
DOS_MIN_INTERVAL
(package private) long
last_dos_check
(package private) static boolean
LOG_DOS_TO_FILE
(package private) static long
MAX_DOS_ENTRIES
(package private) static long
MAX_DOS_RETENTION
private int
port
static long
PROCESSING_GET_LIMIT
static int
PROCESSING_POST_MULTIPLIER
private boolean
restrict_non_blocking_requests
private boolean
ssl
private ThreadPool
thread_pool
private static int
THREAD_POOL_SIZE
-
Fields inherited from class com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
all_networks_permitted, announce_cache_period, announce_cache_threshold, banned_clients, CLIENT_TIMEOUT_MULTIPLIER, full_scrape_enable, ip_filter, listeners, listeners2, max_peers_to_send, max_seed_retention, permitted_networks, redirect_on_not_found, RETRY_MINIMUM_MILLIS, RETRY_MINIMUM_SECS, scrape_cache_period, seed_limit, send_peer_ids, support_experimental_extensions, this_mon, TIMEOUT_CHECK
-
Fields inherited from interface com.biglybt.core.tracker.server.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
Constructors Constructor Description TRTrackerServerTCP(java.lang.String _name, int _port, boolean _ssl, boolean _apply_ip_filter, boolean _start_up_ready)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkDOS(java.lang.String ip)
protected boolean
checkDOSRemove(java.util.Map.Entry eldest)
java.lang.String
getHost()
int
getPort()
boolean
getRestrictNonBlocking()
protected boolean
handleExternalRequest(TRTrackerServerProcessorTCP processor, java.net.InetSocketAddress local_address, java.net.InetSocketAddress client_address, java.lang.String user, java.lang.String url, java.net.URL absolute_url, java.lang.String header, java.io.InputStream is, java.io.OutputStream os, AsyncController async, boolean[] keep_alive)
protected boolean
isIPFilterEnabled()
boolean
isSSL()
void
runProcessor(TRTrackerServerProcessorTCP processor)
protected void
setPort(int _port)
void
setRestrictNonBlocking(boolean restrict)
-
Methods inherited from class com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
addAuthenticationListener, addLink, addListener, addListener2, addRequestListener, close, closeSupport, deny, destroySupport, getAllNetworksSupported, getAnnounceCachePeerThreshold, getAnnounceCachePeriod, getAnnounceRetryInterval, getBiasedPeers, getMaxPeersToSend, getMaxSeedRetention, getMinAnnounceRetryInterval, getMinScrapeRetryInterval, getName, getPassword, getPeers, getPermittedNetworks, getScrapeCachePeriod, getScrapeRetryInterval, getSeedAnnounceIntervalMultiplier, getSeedLimit, getSendPeerIds, getStats, getStats, getTorrent, getTorrent, getTorrentCount, getTorrents, getUsername, hasExternalAuthorisation, hasInternalAuthorisation, isCompactEnabled, isEnabled, isFullScrapeEnabled, isKeepAliveEnabled, isKeyEnabled, isKnownTorrent, isReady, isTrackerPasswordEnabled, isWebPasswordEnabled, isWebPasswordHTTPSOnly, performExternalAuthorisation, performExternalAuthorisation, permit, permit, postProcess, preProcess, readConfig, readConfigSettings, removeAuthenticationListener, removeLink, removeListener, removeListener2, removeRequestListener, setBiasedPeers, setEnabled, setEnableKeepAlive, setReady, supportsExtensions, timerLoop, updateStats, updateTime
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.core.tracker.server.TRTrackerServer
getBindIP
-
-
-
-
Field Detail
-
THREAD_POOL_SIZE
private static final int THREAD_POOL_SIZE
-
PROCESSING_GET_LIMIT
public static final long PROCESSING_GET_LIMIT
-
PROCESSING_POST_MULTIPLIER
public static final int PROCESSING_POST_MULTIPLIER
-
ssl
private final boolean ssl
-
port
private int port
-
apply_ip_filter
private final boolean apply_ip_filter
-
restrict_non_blocking_requests
private boolean restrict_non_blocking_requests
-
thread_pool
private final ThreadPool thread_pool
-
LOG_DOS_TO_FILE
static boolean LOG_DOS_TO_FILE
-
dos_log_file
protected static java.io.File dos_log_file
-
class_mon
protected static final AEMonitor class_mon
-
DOS_map
final java.util.Map DOS_map
-
dos_list
final java.util.List dos_list
-
last_dos_check
long last_dos_check
-
MAX_DOS_ENTRIES
static final long MAX_DOS_ENTRIES
- See Also:
- Constant Field Values
-
MAX_DOS_RETENTION
static final long MAX_DOS_RETENTION
- See Also:
- Constant Field Values
-
DOS_CHECK_DEAD_WOOD_COUNT
static final int DOS_CHECK_DEAD_WOOD_COUNT
- See Also:
- Constant Field Values
-
DOS_MIN_INTERVAL
static final int DOS_MIN_INTERVAL
- See Also:
- Constant Field Values
-
dos_check_count
int dos_check_count
-
-
Constructor Detail
-
TRTrackerServerTCP
public TRTrackerServerTCP(java.lang.String _name, int _port, boolean _ssl, boolean _apply_ip_filter, boolean _start_up_ready) throws TRTrackerServerException
- Throws:
TRTrackerServerException
-
-
Method Detail
-
runProcessor
public void runProcessor(TRTrackerServerProcessorTCP processor)
-
isIPFilterEnabled
protected boolean isIPFilterEnabled()
-
getRestrictNonBlocking
public boolean getRestrictNonBlocking()
-
setRestrictNonBlocking
public void setRestrictNonBlocking(boolean restrict)
-
checkDOS
protected boolean checkDOS(java.lang.String ip) throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
-
checkDOSRemove
protected boolean checkDOSRemove(java.util.Map.Entry eldest)
-
getPort
public int getPort()
-
setPort
protected void setPort(int _port)
-
getHost
public java.lang.String getHost()
-
isSSL
public boolean isSSL()
-
handleExternalRequest
protected boolean handleExternalRequest(TRTrackerServerProcessorTCP processor, java.net.InetSocketAddress local_address, java.net.InetSocketAddress client_address, java.lang.String user, java.lang.String url, java.net.URL absolute_url, java.lang.String header, java.io.InputStream is, java.io.OutputStream os, AsyncController async, boolean[] keep_alive) throws java.io.IOException
- Throws:
java.io.IOException
-
-