org.gudy.azureus2.plugins.network
Interface ConnectionManager

All Known Implementing Classes:
ConnectionManagerImpl

public interface ConnectionManager

Manages connections.


Field Summary
static int NAT_BAD
           
static int NAT_OK
           
static int NAT_PROBABLY_OK
           
static int NAT_UNKNOWN
           
 
Method Summary
 Connection createConnection(java.net.InetSocketAddress remote_address, MessageStreamEncoder encoder, MessageStreamDecoder decoder)
          Create a new unconnected remote connection (for outbound-initiated connections).
 RateLimiter createRateLimiter(java.lang.String name, int bytes_per_second)
           
 TransportCipher createTransportCipher(java.lang.String algorithm, int mode, javax.crypto.spec.SecretKeySpec key_spec, java.security.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
 

Field Detail

NAT_UNKNOWN

static final int NAT_UNKNOWN
See Also:
Constant Field Values

NAT_OK

static final int NAT_OK
See Also:
Constant Field Values

NAT_PROBABLY_OK

static final int NAT_PROBABLY_OK
See Also:
Constant Field Values

NAT_BAD

static final int NAT_BAD
See Also:
Constant Field Values
Method Detail

createConnection

Connection createConnection(java.net.InetSocketAddress remote_address,
                            MessageStreamEncoder encoder,
                            MessageStreamDecoder decoder)
Create a new unconnected remote connection (for outbound-initiated connections).

Parameters:
remote_address - to connect to
Returns:
not yet established connection

getNATStatus

int getNATStatus()
Returns the current view on whether or not we are inwardly connectable via our listener port

Returns:

createTransportCipher

TransportCipher createTransportCipher(java.lang.String algorithm,
                                      int mode,
                                      javax.crypto.spec.SecretKeySpec key_spec,
                                      java.security.spec.AlgorithmParameterSpec params)
                                      throws TransportException
Throws:
TransportException
Since:
3.0.5.3

createTransportFilter

TransportFilter createTransportFilter(Connection connection,
                                      TransportCipher read_cipher,
                                      TransportCipher write_cipher)
                                      throws TransportException
Throws:
TransportException
Since:
3.0.5.3

createRateLimiter

RateLimiter createRateLimiter(java.lang.String name,
                              int bytes_per_second)
Since:
4.7.0.3