org.gudy.azureus2.pluginsimpl.local.messaging
Class GenericMessageConnectionImpl
java.lang.Object
org.gudy.azureus2.pluginsimpl.local.messaging.GenericMessageConnectionImpl
- All Implemented Interfaces:
- GenericMessageConnection
public class GenericMessageConnectionImpl
- extends java.lang.Object
- implements GenericMessageConnection
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericMessageConnectionImpl
protected GenericMessageConnectionImpl(MessageManagerImpl _message_manager,
GenericMessageConnectionAdapter _delegate)
GenericMessageConnectionImpl
protected GenericMessageConnectionImpl(MessageManagerImpl _message_manager,
java.lang.String _msg_id,
java.lang.String _msg_desc,
GenericMessageEndpointImpl _endpoint,
int _stream_crypto,
byte[][] _shared_secrets)
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
isIncoming
public boolean isIncoming()
getConnectMethodCount
public int getConnectMethodCount()
connect
public void connect()
throws MessageException
- Specified by:
connect
in interface GenericMessageConnection
- Throws:
MessageException
setDelegate
protected void setDelegate(GenericMessageConnectionAdapter _delegate)
connect
public void connect(java.nio.ByteBuffer initial_data)
throws MessageException
- Outgoing connection
- Parameters:
initial_data
-
- Throws:
MessageException
connectTCP
protected void connectTCP(java.nio.ByteBuffer initial_data,
java.net.InetSocketAddress tcp_ep)
connectUDP
protected void connectUDP(java.nio.ByteBuffer initial_data,
java.net.InetSocketAddress udp_ep,
boolean nat_traversal)
connectTunnel
protected void connectTunnel(java.nio.ByteBuffer initial_data,
GenericMessageEndpoint ep,
java.net.InetSocketAddress rendezvous,
java.net.InetSocketAddress target)
accepted
protected void accepted()
- Incoming connection has been accepted
send
public void send(PooledByteBuffer message)
throws MessageException
- Specified by:
send
in interface GenericMessageConnection
- Throws:
MessageException
receive
protected void receive(GenericMessage message)
closing
public void closing()
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 e)
addListener
public void addListener(GenericMessageConnectionListener listener)
- Specified by:
addListener
in interface GenericMessageConnection
removeListener
public void removeListener(GenericMessageConnectionListener listener)
- Specified by:
removeListener
in interface GenericMessageConnection