FileDocCategorySizeDatePackage
PluginConfig.javaAPI DocAzureus 3.0.3.426011Wed Feb 07 12:00:42 GMT 2007org.gudy.azureus2.plugins

PluginConfig

public interface PluginConfig
author
Olivier

Fields Summary
public static final String
CORE_PARAM_INT_MAX_UPLOAD_SPEED_KBYTES_PER_SEC
public static final String
CORE_PARAM_INT_MAX_UPLOAD_SPEED_SEEDING_KBYTES_PER_SEC
public static final String
CORE_PARAM_INT_MAX_DOWNLOAD_SPEED_KBYTES_PER_SEC
public static final String
CORE_PARAM_INT_MAX_CONNECTIONS_PER_TORRENT
public static final String
CORE_PARAM_INT_MAX_CONNECTIONS_GLOBAL
public static final String
CORE_PARAM_INT_MAX_DOWNLOADS
public static final String
CORE_PARAM_INT_MAX_ACTIVE
public static final String
CORE_PARAM_INT_MAX_ACTIVE_SEEDING
public static final String
CORE_PARAM_INT_MAX_UPLOADS
public static final String
CORE_PARAM_INT_MAX_UPLOADS_SEEDING
public static final String
CORE_PARAM_BOOLEAN_AUTO_SPEED_ON
public static final String
CORE_PARAM_BOOLEAN_MAX_UPLOAD_SPEED_SEEDING
public static final String
CORE_PARAM_BOOLEAN_MAX_ACTIVE_SEEDING
public static final String
CORE_PARAM_BOOLEAN_SOCKS_PROXY_NO_INWARD_CONNECTION
public static final String
CORE_PARAM_BOOLEAN_NEW_SEEDS_START_AT_TOP
public static final String
CORE_PARAM_STRING_LOCAL_BIND_IP
public static final String
CORE_PARAM_BOOLEAN_FRIENDLY_HASH_CHECKING
Constructors Summary
Methods Summary
public voidaddListener(PluginConfigListener l)

public booleangetBooleanParameter(java.lang.String key)
Returns the value of a core boolean parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.0.4.2

public booleangetBooleanParameter(java.lang.String key, boolean default_value)
Returns the value of a core boolean parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.0.6.0

public byte[]getByteParameter(java.lang.String key)
Returns the value of a core byte array parameter.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public byte[]getByteParameter(java.lang.String key, byte[] default_value)
Returns the value of a core byte array parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.1.0.2

public floatgetFloatParameter(java.lang.String key)
Returns the value of a core float parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.1.0.0

public floatgetFloatParameter(java.lang.String key, float default_value)
Returns the value of a core float parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.7

public intgetIntParameter(java.lang.String key)
Returns the value of a core int parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.0.4.2

public intgetIntParameter(java.lang.String key, int default_value)
Returns the value of a core int parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.0.7.0

public longgetLongParameter(java.lang.String key, long default_value)
Returns the value of a core long parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.7

public longgetLongParameter(java.lang.String key)
Returns the value of a core long parameter.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public ConfigParametergetParameter(java.lang.String key)

public booleangetPluginBooleanParameter(java.lang.String key)
Returns the value of a plugin boolean parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.0.4.2

public booleangetPluginBooleanParameter(java.lang.String key, boolean default_value)
Returns the value of a plugin boolean parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.0.4.2

public byte[]getPluginByteParameter(java.lang.String key)
Returns the value of a plugin byte array parameter.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public byte[]getPluginByteParameter(java.lang.String key, byte[] default_value)
Returns the value of a plugin byte array parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.2.0.3

public java.lang.StringgetPluginConfigKeyPrefix()

return
the prefix used when storing configuration values in the config file for this plugin's config parameters
since
2.1.0.0

public floatgetPluginFloatParameter(java.lang.String key)
Returns the value of a plugin float parameter.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public floatgetPluginFloatParameter(java.lang.String key, float default_value)
Returns the value of a plugin float parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.7

public intgetPluginIntParameter(java.lang.String key)
Returns the value of a plugin int parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.0.4.2

public intgetPluginIntParameter(java.lang.String key, int default_value)
Returns the value of a plugin int parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.0.4.2

public java.util.ListgetPluginListParameter(java.lang.String key, java.util.List default_value)
Returns the value of a plugin list parameter. The contents of the list must conform to bencodable rules (e.g. Map, Long, byte[], List)

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.3.0.1

public longgetPluginLongParameter(java.lang.String key)
Returns the value of a plugin long parameter.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public longgetPluginLongParameter(java.lang.String key, long default_value)
Returns the value of a plugin long parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.7

public java.util.MapgetPluginMapParameter(java.lang.String key, java.util.Map default_value)
Returns the value of a plugin map parameter. The contents of the map must conform to bencodable rules (e.g. Map, Long, byte[], List)

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.3.0.1

public ConfigParametergetPluginParameter(java.lang.String key)

public java.lang.StringgetPluginStringParameter(java.lang.String key)
Returns the value of a plugin string parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.0.4.2

public java.lang.StringgetPluginStringParameter(java.lang.String key, java.lang.String default_value)
Returns the value of a plugin string parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.0.4.2

public java.io.FilegetPluginUserFile(java.lang.String name)
Returns a file that can be used by the plugin to save user-specific state This will be "azureus-user-dir"/plugins//name

param
name
return

public java.lang.StringgetStringParameter(java.lang.String key)
Returns the value of a core string parameter.

param
key The parameter name.
return
The value of the parameter.
since
2.0.4.2

public java.lang.StringgetStringParameter(java.lang.String key, java.lang.String default_value)
Returns the value of a core string parameter.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
2.1.0.0

public booleangetUnsafeBooleanParameter(java.lang.String key)
Returns the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.7

public booleangetUnsafeBooleanParameter(java.lang.String key, boolean default_value)
Returns the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.5

public byte[]getUnsafeByteParameter(java.lang.String key)
Returns the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public byte[]getUnsafeByteParameter(java.lang.String key, byte[] default_value)
Returns the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.7

public floatgetUnsafeFloatParameter(java.lang.String key)
Returns the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public floatgetUnsafeFloatParameter(java.lang.String key, float default_value)
Returns the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.5

public intgetUnsafeIntParameter(java.lang.String key)
Returns the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public intgetUnsafeIntParameter(java.lang.String key, int default_value)
Returns the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.5

public longgetUnsafeLongParameter(java.lang.String key)
Returns the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public longgetUnsafeLongParameter(java.lang.String key, long default_value)
Returns the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.5

public java.util.MapgetUnsafeParameterList()
Returns a map giving parameter names -> parameter values. Value can be Long or String as the type is actually not known by the core (might fix one day). Therefore, float values are actually represented by their String format: boolean - Long 0 or 1 int - Long.intValue float - String value String - String Unsafe methods - existence/semantics of parameters not guaranteed to be maintained across versions If something changes and breaks your plugin, don't come complaining to me

since
2.5.0.3

public java.lang.StringgetUnsafeStringParameter(java.lang.String key)
Returns the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
return
The value of the parameter.
since
3.0.0.7

public java.lang.StringgetUnsafeStringParameter(java.lang.String key, java.lang.String default_value)
Returns the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name.
param
default_value The default value to return if one is not defined.
return
The value of the parameter.
since
3.0.0.5

public booleanhasParameter(java.lang.String param_name)
Returns true if a core parameter with the given name exists.

param
key The name of the parameter to check.
since
2.5.0.2

public booleanhasPluginParameter(java.lang.String param_name)
Returns true if a plugin parameter with the given name exists.

param
key The name of the parameter to check.
since
2.5.0.2

public booleanisNewInstall()

public booleanremovePluginParameter(java.lang.String key)
Removes the plugin parameter with the given name.

param
key Name of the parameter.
return
true if the parameter was found and removed.

public voidsave()
make sure you save it after making changes!

since
2.0.8.0

public voidsetBooleanParameter(java.lang.String key, boolean value)
Sets the value of a core boolean parameter.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.

public voidsetByteParameter(java.lang.String key, byte[] value)
Sets the value of a core byte array parameter.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetFloatParameter(java.lang.String key, float value)
Sets the value of a core float parameter.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetIntParameter(java.lang.String key, int value)
Sets the value of a core int parameter.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
2.0.8.0

public voidsetLongParameter(java.lang.String key, long value)
Sets the value of a core long parameter.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetPluginConfigKeyPrefix(java.lang.String _key)

param
_key
since
2.5.0.1

public voidsetPluginListParameter(java.lang.String key, java.util.List value)
Sets the value of a plugin list parameter. The contents of the list must conform to bencodable rules (e.g. Map, Long, byte[], List)

param
key The parameter name.
param
value The new value for the parameter.
since
2.3.0.1

public voidsetPluginMapParameter(java.lang.String key, java.util.Map value)
Sets the value of a plugin map parameter. The contents of the map must conform to bencodable rules (e.g. Map, Long, byte[], List)

param
key The parameter name.
param
value The new value for the parameter.
since
2.3.0.1

public voidsetPluginParameter(java.lang.String key, boolean value)
Sets the value of a plugin boolean parameter.

param
key The parameter name.
param
value The new value for the parameter.
since
2.0.4.2

public voidsetPluginParameter(java.lang.String key, byte[] value)
Sets the value of a plugin byte array parameter.

param
key The parameter name.
param
value The new value for the parameter.
since
2.1.0.2

public voidsetPluginParameter(java.lang.String key, float value)
Sets the value of a plugin float parameter.

param
key The parameter name.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetPluginParameter(java.lang.String key, int value)
Sets the value of a plugin int parameter.

param
key The parameter name.
param
value The new value for the parameter.
since
2.0.4.2

public voidsetPluginParameter(java.lang.String key, int value, boolean global)
Sets the value of a plugin int parameter.

param
key The parameter name.
param
value The new value for the parameter.
param
global Whether or not this parameter should be made externally accessible.
since
2.5.0.1

public voidsetPluginParameter(java.lang.String key, long value)
Sets the value of a plugin long parameter.

param
key The parameter name.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetPluginParameter(java.lang.String key, java.lang.String value)
Sets the value of a plugin string parameter.

param
key The parameter name.
param
value The new value for the parameter.
since
2.0.4.2

public voidsetStringParameter(java.lang.String key, java.lang.String value)
Sets the value of a core string parameter.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetUnsafeBooleanParameter(java.lang.String key, boolean value)
Sets the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.5

public voidsetUnsafeByteParameter(java.lang.String key, byte[] value)
Sets the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.7

public voidsetUnsafeFloatParameter(java.lang.String key, float value)
Sets the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.5

public voidsetUnsafeIntParameter(java.lang.String key, int value)
Sets the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.5

public voidsetUnsafeLongParameter(java.lang.String key, long value)
Sets the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.5

public voidsetUnsafeStringParameter(java.lang.String key, java.lang.String value)
Sets the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

param
key The parameter name, which must be one defined from the above core constants.
param
value The new value for the parameter.
since
3.0.0.5