org.gudy.azureus2.core3.tracker.server.impl.tcp.nonblocking
Class TRNonBlockingServer

java.lang.Object
  extended by org.gudy.azureus2.core3.tracker.server.impl.TRTrackerServerImpl
      extended by org.gudy.azureus2.core3.tracker.server.impl.tcp.TRTrackerServerTCP
          extended by org.gudy.azureus2.core3.tracker.server.impl.tcp.nonblocking.TRNonBlockingServer
All Implemented Interfaces:
VirtualServerChannelSelector.SelectListener, TRTrackerServer

public class TRNonBlockingServer
extends TRTrackerServerTCP
implements VirtualServerChannelSelector.SelectListener

Author:
parg

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gudy.azureus2.core3.tracker.server.impl.tcp.TRTrackerServerTCP
TRTrackerServerTCP.DOSEntry
 
Field Summary
static int MAX_CONCURRENT_CONNECTIONS
           
 
Fields inherited from class org.gudy.azureus2.core3.tracker.server.impl.tcp.TRTrackerServerTCP
class_mon, dos_log_file, PROCESSING_GET_LIMIT, PROCESSING_POST_MULTIPLIER
 
Fields inherited from class org.gudy.azureus2.core3.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, TIMEOUT_CHECK
 
Fields inherited from interface org.gudy.azureus2.core3.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
TRNonBlockingServer(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, boolean _start_up_ready, TRNonBlockingServerProcessorFactory _processor_factory)
           
TRNonBlockingServer(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, TRNonBlockingServerProcessorFactory _processor_factory)
           
 
Method Summary
 void checkTimeouts(long now)
           
 void closeLoop()
           
protected  void closeSupport()
           
 InetAddress getBindIP()
           
 void newConnectionAccepted(ServerSocketChannel server, SocketChannel channel)
          The given connection has just been accepted.
protected  void readyToWrite(TRNonBlockingServerProcessor processor)
           
protected  void removeAndCloseConnection(TRNonBlockingServerProcessor processor)
           
protected  void selectLoop(VirtualChannelSelector selector)
           
 void setImmediateClose(boolean immediate)
           
 
Methods inherited from class org.gudy.azureus2.core3.tracker.server.impl.tcp.TRTrackerServerTCP
checkDOS, checkDOSRemove, getHost, getPort, getRestrictNonBlocking, handleExternalRequest, isIPFilterEnabled, isSSL, runProcessor, setPort, setRestrictNonBlocking
 
Methods inherited from class org.gudy.azureus2.core3.tracker.server.impl.TRTrackerServerImpl
addAuthenticationListener, addLink, addListener, addListener2, addRequestListener, close, 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, 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
 

Field Detail

MAX_CONCURRENT_CONNECTIONS

public static final int MAX_CONCURRENT_CONNECTIONS
Constructor Detail

TRNonBlockingServer

public TRNonBlockingServer(String _name,
                           int _port,
                           InetAddress _bind_ip,
                           boolean _apply_ip_filter,
                           TRNonBlockingServerProcessorFactory _processor_factory)
                    throws TRTrackerServerException
Throws:
TRTrackerServerException

TRNonBlockingServer

public TRNonBlockingServer(String _name,
                           int _port,
                           InetAddress _bind_ip,
                           boolean _apply_ip_filter,
                           boolean _start_up_ready,
                           TRNonBlockingServerProcessorFactory _processor_factory)
                    throws TRTrackerServerException
Throws:
TRTrackerServerException
Method Detail

getBindIP

public InetAddress getBindIP()
Specified by:
getBindIP in interface TRTrackerServer

setImmediateClose

public void setImmediateClose(boolean immediate)

selectLoop

protected void selectLoop(VirtualChannelSelector selector)

newConnectionAccepted

public void newConnectionAccepted(ServerSocketChannel server,
                                  SocketChannel channel)
Description copied from interface: VirtualServerChannelSelector.SelectListener
The given connection has just been accepted.

Specified by:
newConnectionAccepted in interface VirtualServerChannelSelector.SelectListener
channel - new connection

readyToWrite

protected void readyToWrite(TRNonBlockingServerProcessor processor)

removeAndCloseConnection

protected void removeAndCloseConnection(TRNonBlockingServerProcessor processor)

checkTimeouts

public void checkTimeouts(long now)

closeLoop

public void closeLoop()

closeSupport

protected void closeSupport()
Specified by:
closeSupport in class TRTrackerServerImpl