org.gudy.azureus2.core3.config.impl
Class TransferSpeedValidator
java.lang.Object
org.gudy.azureus2.core3.config.impl.TransferSpeedValidator
public final class TransferSpeedValidator
- extends Object
Provides validation for transfer speed settings
- Since:
- 1.4
- Version:
- 1.0
- Author:
- James Yeh
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTO_UPLOAD_ENABLED_CONFIGKEY
public static final String AUTO_UPLOAD_ENABLED_CONFIGKEY
- See Also:
- Constant Field Values
AUTO_UPLOAD_SEEDING_ENABLED_CONFIGKEY
public static final String AUTO_UPLOAD_SEEDING_ENABLED_CONFIGKEY
- See Also:
- Constant Field Values
UPLOAD_CONFIGKEY
public static final String UPLOAD_CONFIGKEY
- See Also:
- Constant Field Values
UPLOAD_SEEDING_CONFIGKEY
public static final String UPLOAD_SEEDING_CONFIGKEY
- See Also:
- Constant Field Values
DOWNLOAD_CONFIGKEY
public static final String DOWNLOAD_CONFIGKEY
- See Also:
- Constant Field Values
UPLOAD_SEEDING_ENABLED_CONFIGKEY
public static final String UPLOAD_SEEDING_ENABLED_CONFIGKEY
- See Also:
- Constant Field Values
CONFIG_PARAMS
public static final String[] CONFIG_PARAMS
TransferSpeedValidator
public TransferSpeedValidator(String configKey,
Number value)
- Creates a TransferSpeedValidator with the given configuration key and value
- Parameters:
configKey
- Configuration key; must be "Max Upload Speed KBs" or "Max Download Speed KBs"value
- Configuration value to be validated
getValue
public Object getValue()
- Validates the given configuration key/value pair and returns the validated value
- Returns:
- Modified configuration value that conforms to validation as an Integer
getActiveUploadParameter
public static String getActiveUploadParameter(GlobalManager gm)
getDownloadParameter
public static String getDownloadParameter()
getGlobalDownloadRateLimitBytesPerSecond
public static int getGlobalDownloadRateLimitBytesPerSecond()
setGlobalDownloadRateLimitBytesPerSecond
public static void setGlobalDownloadRateLimitBytesPerSecond(int bytes_per_second)
isAutoUploadAvailable
public static boolean isAutoUploadAvailable(AzureusCore core)
isAutoSpeedActive
public static boolean isAutoSpeedActive(GlobalManager gm)
getActiveAutoUploadParameter
public static String getActiveAutoUploadParameter(GlobalManager gm)