org.gudy.azureus2.pluginsimpl.local.utils.security
Class SESTSConnectionImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.utils.security.SESTSConnectionImpl
All Implemented Interfaces:
GenericMessageConnection

public class SESTSConnectionImpl
extends java.lang.Object
implements GenericMessageConnection


Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.messaging.generic.GenericMessageConnection
TT_INDIRECT, TT_NONE, TT_TCP, TT_UDP
 
Constructor Summary
protected SESTSConnectionImpl(AzureusCore _core, GenericMessageConnectionImpl _connection, SEPublicKey _my_public_key, SEPublicKeyLocator _key_locator, java.lang.String _reason, int _block_crypto)
           
 
Method Summary
 void addInboundRateLimiter(RateLimiter limiter)
           
 void addListener(GenericMessageConnectionListener listener)
           
 void addOutboundRateLimiter(RateLimiter limiter)
           
 void close()
           
 void connect()
           
protected  void cryptoComplete()
           
protected  int getConnectMethodCount()
           
 GenericMessageEndpoint getEndpoint()
           
 int getMaximumMessageSize()
           
 int getTransportType()
           
 java.lang.String getType()
           
protected static void rateLimit(java.net.InetSocketAddress originator)
           
 void receive(PooledByteBuffer message)
           
protected  void receiveContent(PooledByteBuffer message)
           
 void removeInboundRateLimiter(RateLimiter limiter)
           
 void removeListener(GenericMessageConnectionListener listener)
           
 void removeOutboundRateLimiter(RateLimiter limiter)
           
protected  void reportConnected()
           
protected  void reportFailed(java.lang.Throwable error)
           
 void send(PooledByteBuffer message)
           
protected  void sendContent(PooledByteBuffer message)
           
protected  void setFailed()
           
protected  void setupBlockCrypto()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SESTSConnectionImpl

protected SESTSConnectionImpl(AzureusCore _core,
                              GenericMessageConnectionImpl _connection,
                              SEPublicKey _my_public_key,
                              SEPublicKeyLocator _key_locator,
                              java.lang.String _reason,
                              int _block_crypto)
                       throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getConnectMethodCount

protected int getConnectMethodCount()

rateLimit

protected static void rateLimit(java.net.InetSocketAddress originator)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getEndpoint

public GenericMessageEndpoint getEndpoint()
Specified by:
getEndpoint in interface GenericMessageConnection

getMaximumMessageSize

public int getMaximumMessageSize()
Specified by:
getMaximumMessageSize in interface GenericMessageConnection

getType

public java.lang.String getType()
Specified by:
getType in interface GenericMessageConnection

getTransportType

public int getTransportType()
Specified by:
getTransportType in interface GenericMessageConnection

addInboundRateLimiter

public void addInboundRateLimiter(RateLimiter limiter)
Specified by:
addInboundRateLimiter in interface GenericMessageConnection

removeInboundRateLimiter

public void removeInboundRateLimiter(RateLimiter limiter)
Specified by:
removeInboundRateLimiter in interface GenericMessageConnection

addOutboundRateLimiter

public void addOutboundRateLimiter(RateLimiter limiter)
Specified by:
addOutboundRateLimiter in interface GenericMessageConnection

removeOutboundRateLimiter

public void removeOutboundRateLimiter(RateLimiter limiter)
Specified by:
removeOutboundRateLimiter in interface GenericMessageConnection

connect

public void connect()
             throws MessageException
Specified by:
connect in interface GenericMessageConnection
Throws:
MessageException

setFailed

protected void setFailed()

receive

public void receive(PooledByteBuffer message)
             throws MessageException
Throws:
MessageException

setupBlockCrypto

protected void setupBlockCrypto()
                         throws MessageException
Throws:
MessageException

cryptoComplete

protected void cryptoComplete()
                       throws MessageException
Throws:
MessageException

send

public void send(PooledByteBuffer message)
          throws MessageException
Specified by:
send in interface GenericMessageConnection
Throws:
MessageException

sendContent

protected void sendContent(PooledByteBuffer message)
                    throws MessageException
Throws:
MessageException

receiveContent

protected void receiveContent(PooledByteBuffer message)
                       throws MessageException
Throws:
MessageException

close

public void close()
           throws MessageException
Specified by:
close in interface GenericMessageConnection
Throws:
MessageException

reportConnected

protected void reportConnected()

reportFailed

protected void reportFailed(java.lang.Throwable error)

addListener

public void addListener(GenericMessageConnectionListener listener)
Specified by:
addListener in interface GenericMessageConnection

removeListener

public void removeListener(GenericMessageConnectionListener listener)
Specified by:
removeListener in interface GenericMessageConnection