org.opennms.netmgt.rrd
Class RrdConfig

java.lang.Object
  extended by org.opennms.netmgt.rrd.RrdConfig

public class RrdConfig
extends Object

Provides access to the rrd configuration data.


Constructor Summary
RrdConfig()
           
 
Method Summary
static boolean getProperty(String name, boolean defaultVal)
          Get a boolean valued property, returning default value if it is not set or is set to an invalid value.
static int getProperty(String name, int defaultVal)
          Get a int valued property, returning default value if it is not set or is set to an invalid value.
static long getProperty(String name, long defaultVal)
          Get a long valued property, returning default value if it is not set or is set to an invalid value
static String getProperty(String name, String defaultVal)
          Get a string valued property, returning default value if it is not set.
static void loadProperties(InputStream in)
           
static void setProperties(Properties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RrdConfig

public RrdConfig()
Method Detail

loadProperties

public static void loadProperties(InputStream in)
                           throws IOException
Throws:
IOException

setProperties

public static void setProperties(Properties properties)

getProperty

public static String getProperty(String name,
                                 String defaultVal)
Get a string valued property, returning default value if it is not set.

Parameters:
name - the property name
defaultVal - the default value to use if the property is not set
Returns:
the value of the property

getProperty

public static boolean getProperty(String name,
                                  boolean defaultVal)
Get a boolean valued property, returning default value if it is not set or is set to an invalid value.

Parameters:
name - the property name
defaultVal - the default value to use if the property is not set
Returns:
the value of the property

getProperty

public static int getProperty(String name,
                              int defaultVal)
Get a int valued property, returning default value if it is not set or is set to an invalid value.

Parameters:
name - the property name
defaultVal - the default value to use if the property is not set
Returns:
the value of the property

getProperty

public static long getProperty(String name,
                               long defaultVal)
Get a long valued property, returning default value if it is not set or is set to an invalid value

Parameters:
name - the property name
defaultVal - the default value to use if the property is not set
Returns:
the value of the property


Copyright © 2009. All Rights Reserved.