com.aelitis.azureus.core.networkmanager.impl.udp
Class UDPConnectionManager

java.lang.Object
  extended by com.aelitis.azureus.core.networkmanager.impl.udp.UDPConnectionManager
All Implemented Interfaces:
NetworkGlueListener

public class UDPConnectionManager
extends Object
implements NetworkGlueListener


Nested Class Summary
protected  class UDPConnectionManager.ProtocolTimer
           
 
Field Summary
static int DEAD_KEY_RETENTION_PERIOD
           
static int STATS_TICKS
           
static int STATS_TIME
           
static int THREAD_LINGER_ON_IDLE_PERIOD
           
static int TIMER_TICK_MILLIS
           
 
Constructor Summary
protected UDPConnectionManager()
           
 
Method Summary
protected  void accept(int local_port, InetSocketAddress remote_address, UDPConnection connection)
           
protected  int allocationConnectionID()
           
protected  UDPSelector checkThreadCreation()
           
protected  void checkThreadDeath(boolean connections_running)
           
 void connectOutbound(UDPTransport udp_transport, InetSocketAddress address, byte[][] shared_secrets, ByteBuffer initial_data, Transport.ConnectListener listener)
           
 void failed(UDPConnectionSet set)
           
 int getMaxOutboundPermitted()
           
protected  void logStats()
           
protected  void poll()
           
protected  boolean rateLimitIncoming(InetSocketAddress s_address)
           
 void receive(int local_port, InetSocketAddress remote_address, byte[] data, int data_length)
           
protected  UDPConnection registerOutgoing(UDPTransportHelper helper)
           
 void remove(UDPConnectionSet set, UDPConnection connection)
           
 int send(int local_port, InetSocketAddress remote_address, byte[] data)
           
protected  void timeoutDeadKeys()
           
protected  boolean trace()
           
protected  void trace(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMER_TICK_MILLIS

public static final int TIMER_TICK_MILLIS
See Also:
Constant Field Values

THREAD_LINGER_ON_IDLE_PERIOD

public static final int THREAD_LINGER_ON_IDLE_PERIOD
See Also:
Constant Field Values

DEAD_KEY_RETENTION_PERIOD

public static final int DEAD_KEY_RETENTION_PERIOD
See Also:
Constant Field Values

STATS_TIME

public static final int STATS_TIME
See Also:
Constant Field Values

STATS_TICKS

public static final int STATS_TICKS
See Also:
Constant Field Values
Constructor Detail

UDPConnectionManager

protected UDPConnectionManager()
Method Detail

connectOutbound

public void connectOutbound(UDPTransport udp_transport,
                            InetSocketAddress address,
                            byte[][] shared_secrets,
                            ByteBuffer initial_data,
                            Transport.ConnectListener listener)

getMaxOutboundPermitted

public int getMaxOutboundPermitted()

checkThreadCreation

protected UDPSelector checkThreadCreation()

checkThreadDeath

protected void checkThreadDeath(boolean connections_running)

poll

protected void poll()

remove

public void remove(UDPConnectionSet set,
                   UDPConnection connection)

failed

public void failed(UDPConnectionSet set)

registerOutgoing

protected UDPConnection registerOutgoing(UDPTransportHelper helper)
                                  throws IOException
Throws:
IOException

receive

public void receive(int local_port,
                    InetSocketAddress remote_address,
                    byte[] data,
                    int data_length)
Specified by:
receive in interface NetworkGlueListener

rateLimitIncoming

protected boolean rateLimitIncoming(InetSocketAddress s_address)

send

public int send(int local_port,
                InetSocketAddress remote_address,
                byte[] data)
         throws IOException
Throws:
IOException

accept

protected void accept(int local_port,
                      InetSocketAddress remote_address,
                      UDPConnection connection)

allocationConnectionID

protected int allocationConnectionID()

timeoutDeadKeys

protected void timeoutDeadKeys()

logStats

protected void logStats()

trace

protected boolean trace()

trace

protected void trace(String str)