com.aelitis.azureus.core.networkmanager.impl
Class IncomingConnectionManager

java.lang.Object
  extended by com.aelitis.azureus.core.networkmanager.impl.IncomingConnectionManager

public class IncomingConnectionManager
extends java.lang.Object


Nested Class Summary
protected static class IncomingConnectionManager.IncomingConnection
           
static interface IncomingConnectionManager.MatchListener
          Listener for byte matches.
protected  class IncomingConnectionManager.SelectorListener
           
 
Constructor Summary
protected IncomingConnectionManager()
           
 
Method Summary
 void addConnection(int local_port, TransportHelperFilter filter, Transport new_transport)
           
 void addSharedSecrets(byte[][] secrets)
           
 java.lang.Object[] checkForMatch(TransportHelper transport, int incoming_port, java.nio.ByteBuffer to_check, boolean min_match)
           
 void deregisterMatchBytes(NetworkManager.ByteMatcher to_remove)
          Remove the given byte sequence match from the registration list.
protected  void doTimeoutChecks()
           
 int getMaxMatchBufferSize()
           
 int getMaxMinMatchBufferSize()
           
static IncomingConnectionManager getSingleton()
           
 boolean isEmpty()
           
 void registerMatchBytes(NetworkManager.ByteMatcher matcher, IncomingConnectionManager.MatchListener listener)
          Register the given byte sequence matcher to handle matching against new incoming connection initial data; i.e.
protected  void removeConnection(IncomingConnectionManager.IncomingConnection connection, boolean close_as_well, java.lang.String reason)
           
 void removeSharedSecrets(byte[][] secrets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncomingConnectionManager

protected IncomingConnectionManager()
Method Detail

getSingleton

public static IncomingConnectionManager getSingleton()

isEmpty

public boolean isEmpty()

checkForMatch

public java.lang.Object[] checkForMatch(TransportHelper transport,
                                        int incoming_port,
                                        java.nio.ByteBuffer to_check,
                                        boolean min_match)

registerMatchBytes

public void registerMatchBytes(NetworkManager.ByteMatcher matcher,
                               IncomingConnectionManager.MatchListener listener)
Register the given byte sequence matcher to handle matching against new incoming connection initial data; i.e. the first bytes read from a connection must match in order for the given listener to be invoked.

Parameters:
matcher - byte filter sequence
listener - to call upon match

deregisterMatchBytes

public void deregisterMatchBytes(NetworkManager.ByteMatcher to_remove)
Remove the given byte sequence match from the registration list.

Parameters:
to_remove - byte sequence originally used to register

addSharedSecrets

public void addSharedSecrets(byte[][] secrets)

removeSharedSecrets

public void removeSharedSecrets(byte[][] secrets)

getMaxMatchBufferSize

public int getMaxMatchBufferSize()

getMaxMinMatchBufferSize

public int getMaxMinMatchBufferSize()

addConnection

public void addConnection(int local_port,
                          TransportHelperFilter filter,
                          Transport new_transport)

removeConnection

protected void removeConnection(IncomingConnectionManager.IncomingConnection connection,
                                boolean close_as_well,
                                java.lang.String reason)

doTimeoutChecks

protected void doTimeoutChecks()