|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aelitis.azureus.core.networkmanager.NetworkManager
public class NetworkManager
Nested Class Summary | |
---|---|
static interface |
NetworkManager.ByteMatcher
Byte stream match filter for routing. |
static interface |
NetworkManager.RoutingListener
Listener for routing events. |
Field Summary | |
---|---|
static int |
CRYPTO_OVERRIDE_NONE
|
static int |
CRYPTO_OVERRIDE_NOT_REQUIRED
|
static int |
CRYPTO_OVERRIDE_REQUIRED
|
static boolean |
INCOMING_CRYPTO_ALLOWED
|
static boolean |
INCOMING_HANDSHAKE_FALLBACK_ALLOWED
|
static boolean |
OUTGOING_HANDSHAKE_FALLBACK_ALLOWED
|
static boolean |
REQUIRE_CRYPTO_HANDSHAKE
|
static int |
UNLIMITED_RATE
|
Method Summary | |
---|---|
void |
addRateLimiter(NetworkConnectionBase peer_connection,
LimitedRateGroup group,
boolean upload)
|
void |
addReadEntity(RateControlledEntity entity,
int partition_id)
Add a download entity for read processing. |
void |
addWriteEntity(RateControlledEntity entity,
int partition_id)
Add an upload entity for write processing. |
NetworkConnection |
bindTransport(Transport transport,
MessageStreamEncoder encoder,
MessageStreamDecoder decoder)
|
void |
cancelIncomingConnectionRouting(NetworkManager.ByteMatcher matcher)
Cancel a request for inbound connection routing. |
NetworkConnection |
createConnection(ConnectionEndpoint target,
MessageStreamEncoder encoder,
MessageStreamDecoder decoder,
boolean connect_with_crypto,
boolean allow_fallback,
byte[][] shared_secrets)
Create a new unconnected remote network connection (for outbound-initiated connections). |
void |
downgradeTransferProcessing(NetworkConnectionBase peer_connection)
Downgrade the given connection back to a normal-speed network transfer handling. |
java.util.Set<NetworkConnectionBase> |
getConnections()
|
static boolean |
getCryptoRequired(int override_level)
|
static int |
getMaxDownloadRateBPS()
This method is for display purposes only, the internal rate limiting is 10% higher than returned by this method! |
static int |
getMaxUploadRateBPSNormal()
|
static int |
getMaxUploadRateBPSSeedingOnly()
|
static int |
getMinMssSize()
|
RateHandler |
getRateHandler(boolean upload,
boolean lan)
|
RateHandler |
getRateHandler(NetworkConnectionBase peer_connection,
boolean upload)
|
static NetworkManager |
getSingleton()
Get the singleton instance of the network manager. |
TransferProcessor |
getUploadProcessor()
|
void |
initialize(AzureusCore core)
|
static boolean |
isLANRateEnabled()
|
static boolean |
isSeedingOnlyUploadRate()
|
void |
removeRateLimiter(NetworkConnectionBase peer_connection,
LimitedRateGroup group,
boolean upload)
|
void |
removeReadEntity(RateControlledEntity entity)
Remove a download entity from read processing. |
void |
removeWriteEntity(RateControlledEntity entity)
Remove an upload entity from write processing. |
void |
requestIncomingConnectionRouting(NetworkManager.ByteMatcher matcher,
NetworkManager.RoutingListener listener,
MessageStreamFactory factory)
Request the acceptance and routing of new incoming connections that match the given initial byte sequence. |
void |
startTransferProcessing(NetworkConnectionBase peer_connection)
Register peer connection for network upload and download handling. |
void |
stopTransferProcessing(NetworkConnectionBase peer_connection)
Cancel network upload and download handling for the given connection. |
void |
upgradeTransferProcessing(NetworkConnectionBase peer_connection,
int partition_id)
Upgrade the given connection to high-speed network transfer handling. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNLIMITED_RATE
public static boolean REQUIRE_CRYPTO_HANDSHAKE
public static boolean INCOMING_HANDSHAKE_FALLBACK_ALLOWED
public static boolean OUTGOING_HANDSHAKE_FALLBACK_ALLOWED
public static boolean INCOMING_CRYPTO_ALLOWED
public static final int CRYPTO_OVERRIDE_NONE
public static final int CRYPTO_OVERRIDE_REQUIRED
public static final int CRYPTO_OVERRIDE_NOT_REQUIRED
Method Detail |
---|
public static boolean isLANRateEnabled()
public static int getMinMssSize()
public static boolean isSeedingOnlyUploadRate()
public static int getMaxUploadRateBPSNormal()
public static int getMaxUploadRateBPSSeedingOnly()
public static int getMaxDownloadRateBPS()
public static boolean getCryptoRequired(int override_level)
public void initialize(AzureusCore core)
public static NetworkManager getSingleton()
public NetworkConnection createConnection(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 queue
public void requestIncomingConnectionRouting(NetworkManager.ByteMatcher matcher, NetworkManager.RoutingListener listener, MessageStreamFactory factory)
matcher
- initial byte sequence used for routinglistener
- for handling new inbound connectionsfactory
- to use for creating default stream encoder/decoderspublic NetworkConnection bindTransport(Transport transport, MessageStreamEncoder encoder, MessageStreamDecoder decoder)
public void cancelIncomingConnectionRouting(NetworkManager.ByteMatcher matcher)
matcher
- byte sequence originally used to registerpublic void addWriteEntity(RateControlledEntity entity, int partition_id)
entity
- to addpublic void removeWriteEntity(RateControlledEntity entity)
entity
- to removepublic void addReadEntity(RateControlledEntity entity, int partition_id)
entity
- to addpublic void removeReadEntity(RateControlledEntity entity)
entity
- to removepublic java.util.Set<NetworkConnectionBase> getConnections()
public void startTransferProcessing(NetworkConnectionBase peer_connection)
peer_connection
- to register for network transfer processingupload_group
- upload rate limit groupdownload_group
- download rate limit grouppublic void stopTransferProcessing(NetworkConnectionBase peer_connection)
peer_connection
- to cancelpublic void upgradeTransferProcessing(NetworkConnectionBase peer_connection, int partition_id)
peer_connection
- to upgradepublic void downgradeTransferProcessing(NetworkConnectionBase peer_connection)
peer_connection
- to downgradepublic TransferProcessor getUploadProcessor()
public void addRateLimiter(NetworkConnectionBase peer_connection, LimitedRateGroup group, boolean upload)
public void removeRateLimiter(NetworkConnectionBase peer_connection, LimitedRateGroup group, boolean upload)
public RateHandler getRateHandler(boolean upload, boolean lan)
public RateHandler getRateHandler(NetworkConnectionBase peer_connection, boolean upload)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |