org.gudy.azureus2.pluginsimpl.local.network
Class ConnectionManagerImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.network.ConnectionManagerImpl
All Implemented Interfaces:
ConnectionManager

public class ConnectionManagerImpl
extends Object
implements ConnectionManager


Nested Class Summary
 class ConnectionManagerImpl.PluginRateLimiter
           
 
Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.network.ConnectionManager
NAT_BAD, NAT_OK, NAT_PROBABLY_OK, NAT_UNKNOWN
 
Method Summary
 Connection createConnection(InetSocketAddress remote_address, MessageStreamEncoder encoder, MessageStreamDecoder decoder)
          Create a new unconnected remote connection (for outbound-initiated connections).
 RateLimiter createRateLimiter(String name, int bps)
           
 TransportCipher createTransportCipher(String algorithm, int mode, SecretKeySpec key_spec, AlgorithmParameterSpec params)
           
 TransportFilter createTransportFilter(Connection connection, TransportCipher read_cipher, TransportCipher write_cipher)
           
 int getNATStatus()
          Returns the current view on whether or not we are inwardly connectable via our listener port
static ConnectionManagerImpl getSingleton(AzureusCore core)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static ConnectionManagerImpl getSingleton(AzureusCore core)

createConnection

public Connection createConnection(InetSocketAddress remote_address,
                                   MessageStreamEncoder encoder,
                                   MessageStreamDecoder decoder)
Description copied from interface: ConnectionManager
Create a new unconnected remote connection (for outbound-initiated connections).

Specified by:
createConnection in interface ConnectionManager
Parameters:
remote_address - to connect to
Returns:
not yet established connection

getNATStatus

public int getNATStatus()
Description copied from interface: ConnectionManager
Returns the current view on whether or not we are inwardly connectable via our listener port

Specified by:
getNATStatus in interface ConnectionManager
Returns:

createTransportCipher

public TransportCipher createTransportCipher(String algorithm,
                                             int mode,
                                             SecretKeySpec key_spec,
                                             AlgorithmParameterSpec params)
                                      throws TransportException
Specified by:
createTransportCipher in interface ConnectionManager
Throws:
TransportException

createTransportFilter

public TransportFilter createTransportFilter(Connection connection,
                                             TransportCipher read_cipher,
                                             TransportCipher write_cipher)
                                      throws TransportException
Specified by:
createTransportFilter in interface ConnectionManager
Throws:
TransportException

createRateLimiter

public RateLimiter createRateLimiter(String name,
                                     int bps)
Specified by:
createRateLimiter in interface ConnectionManager