Methods Summary |
---|
public static void | addAndFireParameterListener(java.lang.String parameter, ParameterListener listener)
ConfigurationManager.getInstance().addParameterListener(parameter, listener);
listener.parameterChanged( parameter );
|
public static void | addAndFireParameterListeners(java.lang.String[] parameters, ParameterListener listener)
for (int i=0;i<parameters.length;i++){
ConfigurationManager.getInstance().addParameterListener(parameters[i], listener);
}
listener.parameterChanged( null );
|
public static void | addListener(COConfigurationListener listener)
ConfigurationManager.getInstance().addListener( listener );
|
public static void | addParameterListener(java.lang.String parameter, ParameterListener listener)
ConfigurationManager.getInstance().addParameterListener(parameter, listener);
|
public static void | addParameterListener(java.lang.String[] ids, ParameterListener listener)
ConfigurationManager instance = ConfigurationManager.getInstance();
for (int i = 0; i < ids.length; i++) {
instance.addParameterListener(ids[i], listener);
}
|
public static boolean | doesParameterDefaultExist(java.lang.String parameter)checks if a default is defined for the named parameter
return ConfigurationDefaults.getInstance().doesParameterDefaultExist(parameter);
|
public static boolean | doesParameterNonDefaultExist(java.lang.String parameter)checks if the user has explicitly set a value for the named parameter
return ConfigurationManager.getInstance().doesParameterNonDefaultExist(parameter);
|
public static java.util.Set | getAllowedParameters()
return ConfigurationDefaults.getInstance().getAllowedParameters();
|
public static boolean | getBooleanParameter(java.lang.String _name, boolean _default)
return( ConfigurationManager.getInstance().getBooleanParameter( _name, _default ));
|
public static boolean | getBooleanParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getBooleanParameter( _name ));
|
public static byte[] | getByteParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getByteParameter(_name));
|
public static byte[] | getByteParameter(java.lang.String _name, byte[] _default)
return( ConfigurationManager.getInstance().getByteParameter( _name, _default ));
|
public static java.lang.Object | getDefault(java.lang.String parameter)
return( ConfigurationDefaults.getInstance().getParameter( parameter ));
|
public static java.lang.String | getDirectoryParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getDirectoryParameter( _name ));
|
public static float | getFloatParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getFloatParameter( _name ));
|
public static float | getFloatParameter(java.lang.String _name, float _def)
return( ConfigurationManager.getInstance().getFloatParameter( _name, _def ));
|
public static int | getIntParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getIntParameter( _name ));
|
public static int | getIntParameter(java.lang.String _name, int _default)Only use this for internal values, NOT for ones that the user can sensibly change. In this
case add the key to the configuration defaults and use the above method
return( ConfigurationManager.getInstance().getIntParameter( _name, _default ));
|
public static java.util.List | getListParameter(java.lang.String parameter, java.util.List def)
return( ConfigurationManager.getInstance().getListParameter( parameter, def ));
|
public static long | getLongParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getLongParameter( _name ));
|
public static long | getLongParameter(java.lang.String _name, long _def)Only use this for internal values, NOT for ones that the user can sensibly change. In this
case add the key to the configuration defaults and use the above method
return( ConfigurationManager.getInstance().getLongParameter( _name, _def ));
|
public static java.util.Map | getMapParameter(java.lang.String parameter, java.util.Map def)
return( ConfigurationManager.getInstance().getMapParameter( parameter, def ));
|
public static java.lang.Object | getParameter(java.lang.String name)raw parameter access
return ConfigurationManager.getInstance().getParameter(name);
|
public static StringList | getStringListParameter(java.lang.String parameter)
return( ConfigurationManager.getInstance().getStringListParameter( parameter ));
|
public static java.lang.String | getStringParameter(java.lang.String _name)
return( ConfigurationManager.getInstance().getStringParameter( _name ));
|
public static java.lang.String | getStringParameter(java.lang.String _name, java.lang.String _default)
return( ConfigurationManager.getInstance().getStringParameter( _name, _default ));
|
public static boolean | hasParameter(java.lang.String parameter, boolean explicit)Returns true if a parameter with the given name exists.
return ConfigurationManager.getInstance().hasParameter(parameter, explicit);
|
public static ConfigurationManager | initialise()
preInitialise();
return ConfigurationManager.getInstance();
|
public static ConfigurationManager | initialiseFromMap(java.util.Map data)
preInitialise();
return ConfigurationManager.getInstance(data);
|
public static final boolean | isNewInstall()
return( ConfigurationManager.getInstance().isNewInstall());
|
public static synchronized void | preInitialise()
if ( !pre_initialised ){
pre_initialised = true;
try{
String handlers = System.getProperty( "java.protocol.handler.pkgs" );
if ( handlers == null ){
handlers = "org.gudy.azureus2.core3.util.protocol";
}else{
handlers += "|org.gudy.azureus2.core3.util.protocol";
}
System.setProperty( "java.protocol.handler.pkgs", handlers );
// DNS cache timeouts
System.setProperty("sun.net.inetaddr.ttl", "60");
System.setProperty("networkaddress.cache.ttl", "60");
// defaults, overridden later if needed
System.setProperty( "sun.net.client.defaultConnectTimeout", "120000" );
System.setProperty( "sun.net.client.defaultReadTimeout", "60000" );
//see http://developer.apple.com/releasenotes/Java/Java142RN/ResolvedIssues/chapter_3_section_7.html
//fixes the osx kernel panic bug caused by Apple's faulty kqueue implementation (as of 10.3.6)
if( Constants.isOSX ) {
System.setProperty( "java.nio.preferSelect", "true" );
}
}catch( Throwable e ){
// can happen in applet
e.printStackTrace();
}
}
|
public static void | registerExternalDefaults(java.util.Map addmap)
ConfigurationDefaults.getInstance().registerExternalDefaults(addmap);
|
public static void | removeListener(COConfigurationListener listener)
ConfigurationManager.getInstance().removeListener( listener );
|
public static boolean | removeParameter(java.lang.String parameter)
return ConfigurationManager.getInstance().removeParameter(parameter);
|
public static void | removeParameterListener(java.lang.String parameter, ParameterListener listener)
ConfigurationManager.getInstance().removeParameterListener(parameter, listener);
|
public static void | save()
ConfigurationManager.getInstance().save();
|
public static void | setBooleanDefault(java.lang.String parameter, boolean _default)
ConfigurationDefaults.getInstance().addParameter( parameter, _default );
|
public static void | setByteDefault(java.lang.String parameter, byte[] _default)
ConfigurationDefaults.getInstance().addParameter( parameter, _default );
|
public static void | setDirty()Mark as needing a save but not immediately - use when potentially needing a large number of saves that aren't
absolutely required to be immediately persisted
ConfigurationManager.getInstance().setDirty();
|
public static void | setFloatDefault(java.lang.String parameter, float _default)
ConfigurationDefaults.getInstance().addParameter( parameter, _default );
|
public static void | setIntDefault(java.lang.String parameter, int _default)
ConfigurationDefaults.getInstance().addParameter( parameter, _default );
|
public static void | setLongDefault(java.lang.String parameter, long _default)
ConfigurationDefaults.getInstance().addParameter( parameter, _default );
|
public static boolean | setParameter(java.lang.String parameter, boolean value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, int value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, long value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, byte[] value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, float value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, StringList value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, java.util.List value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, java.util.Map value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setParameter(java.lang.String parameter, java.lang.String value)
return ConfigurationManager.getInstance().setParameter( parameter, value );
|
public static boolean | setRGBParameter(java.lang.String parameter, int red, int green, int blue)
return ConfigurationManager.getInstance().setRGBParameter( parameter, red, green, blue);
|
public static void | setStringDefault(java.lang.String parameter, java.lang.String _default)
ConfigurationDefaults.getInstance().addParameter( parameter, _default );
|
public static boolean | verifyParameter(java.lang.String parameter, java.lang.String value)
return ConfigurationManager.getInstance().verifyParameter( parameter, value );
|