|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aelitis.azureus.core.networkmanager.NetworkConnectionHelper
com.aelitis.azureus.core.networkmanager.impl.NetworkConnectionImpl
public class NetworkConnectionImpl
Nested Class Summary | |
---|---|
protected static class |
NetworkConnectionImpl.bogusTransport
|
Nested classes/interfaces inherited from interface com.aelitis.azureus.core.networkmanager.NetworkConnection |
---|
NetworkConnection.ConnectionListener |
Constructor Summary | |
---|---|
NetworkConnectionImpl(ConnectionEndpoint _target,
MessageStreamEncoder encoder,
MessageStreamDecoder decoder,
boolean _connect_with_crypto,
boolean _allow_fallback,
byte[][] _shared_secrets)
Constructor for new OUTbound connection. |
|
NetworkConnectionImpl(Transport _transport,
MessageStreamEncoder encoder,
MessageStreamDecoder decoder)
Constructor for new INbound connection. |
Method Summary | |
---|---|
void |
close(java.lang.String reason)
Close and shutdown this connection. |
void |
connect(java.nio.ByteBuffer initial_outbound_data,
int priority,
NetworkConnection.ConnectionListener listener)
|
void |
connect(int priority,
NetworkConnection.ConnectionListener listener)
Connect this connection's transport, i.e. |
Transport |
detachTransport()
Decouples the transport from this network connection so it can be reused |
void |
enableEnhancedMessageProcessing(boolean enable,
int partition_id)
Upgrade the connection to high-speed transfer processing. |
ConnectionEndpoint |
getEndpoint()
|
IncomingMessageQueue |
getIncomingMessageQueue()
Get the connection's incoming message queue. |
int |
getMssSize()
|
OutgoingMessageQueue |
getOutgoingMessageQueue()
Get the connection's outgoing message queue. |
java.lang.String |
getString()
|
Transport |
getTransport()
Get the connection's data transport interface. |
TransportBase |
getTransportBase()
Get the connection's data transport interface. |
java.lang.Object |
getUserData(java.lang.Object key)
|
boolean |
isConnected()
|
boolean |
isIncoming()
|
boolean |
isLANLocal()
Is the connection within the local LAN network. |
void |
notifyOfException(java.lang.Throwable error)
Inform connection of a thrown exception. |
java.lang.Object |
setUserData(java.lang.Object key,
java.lang.Object value)
|
void |
startMessageProcessing()
Begin processing incoming and outgoing message queues. |
java.lang.String |
toString()
|
Methods inherited from class com.aelitis.azureus.core.networkmanager.NetworkConnectionHelper |
---|
addRateLimiter, getDownloadLimit, getRateLimiters, getUploadLimit, removeRateLimiter, setDownloadLimit, setUploadLimit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.aelitis.azureus.core.networkmanager.NetworkConnectionBase |
---|
addRateLimiter, getDownloadLimit, getRateLimiters, getUploadLimit, removeRateLimiter, setDownloadLimit, setUploadLimit |
Constructor Detail |
---|
public NetworkConnectionImpl(ConnectionEndpoint _target, MessageStreamEncoder encoder, MessageStreamDecoder decoder, boolean _connect_with_crypto, boolean _allow_fallback, byte[][] _shared_secrets)
_remote_address
- to connect toencoder
- default message stream encoder to use for the outgoing queuedecoder
- default message stream decoder to use for the incoming queuepublic NetworkConnectionImpl(Transport _transport, MessageStreamEncoder encoder, MessageStreamDecoder decoder)
_remote_channel
- connected bydata_already_read
- bytestream already read during routingencoder
- default message stream encoder to use for the outgoing queuedecoder
- default message stream decoder to use for the incoming queueMethod Detail |
---|
public ConnectionEndpoint getEndpoint()
getEndpoint
in interface NetworkConnectionBase
public boolean isIncoming()
isIncoming
in interface NetworkConnectionBase
public void connect(int priority, NetworkConnection.ConnectionListener listener)
NetworkConnection
connect
in interface NetworkConnection
listener
- notified on connect success or failurepublic void connect(java.nio.ByteBuffer initial_outbound_data, int priority, NetworkConnection.ConnectionListener listener)
connect
in interface NetworkConnection
public Transport detachTransport()
NetworkConnection
detachTransport
in interface NetworkConnection
public void close(java.lang.String reason)
NetworkConnection
close
in interface NetworkConnection
public void notifyOfException(java.lang.Throwable error)
NetworkConnectionBase
notifyOfException
in interface NetworkConnectionBase
error
- exceptionpublic OutgoingMessageQueue getOutgoingMessageQueue()
NetworkConnectionBase
getOutgoingMessageQueue
in interface NetworkConnectionBase
public IncomingMessageQueue getIncomingMessageQueue()
NetworkConnectionBase
getIncomingMessageQueue
in interface NetworkConnectionBase
public void startMessageProcessing()
NetworkConnection
startMessageProcessing
in interface NetworkConnection
public void enableEnhancedMessageProcessing(boolean enable, int partition_id)
NetworkConnection
enableEnhancedMessageProcessing
in interface NetworkConnection
enable
- true for high-speed processing, false for normal processingpublic Transport getTransport()
NetworkConnection
getTransport
in interface NetworkConnection
public TransportBase getTransportBase()
NetworkConnectionBase
getTransportBase
in interface NetworkConnectionBase
public int getMssSize()
getMssSize
in interface NetworkConnectionBase
public java.lang.Object setUserData(java.lang.Object key, java.lang.Object value)
setUserData
in interface NetworkConnection
public java.lang.Object getUserData(java.lang.Object key)
getUserData
in interface NetworkConnection
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isConnected()
isConnected
in interface NetworkConnection
public boolean isLANLocal()
NetworkConnectionBase
isLANLocal
in interface NetworkConnectionBase
public java.lang.String getString()
getString
in interface NetworkConnectionBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |