Class Configuration


  • public class Configuration
    extends Object
    This class holds a static list of properties accessible from anywhere. It is used to avoid multiplying system-wide properties. Note that in the case of a server, the properties from the configuration file are reinjected into this object.
    • Field Detail

      • properties

        private static Properties properties
    • Constructor Detail

      • Configuration

        public Configuration()
    • Method Detail

      • getProperties

        public static Properties getProperties()
        Returns a Properties object initialized with defaults specified from AgentServer configuration file and System properties.
        Returns:
        a Properties object initialized with specified defaults.
      • getProperty

        public static String getProperty​(String key)
        Searches for the property with the specified key in the property list.
        Parameters:
        key - the hashtable key.
        Returns:
        the value with the specified key value.
      • getProperty

        public static String getProperty​(String key,
                                         String value)
        Searches for the property with the specified key in the property list.
        Parameters:
        key - the hashtable key.
        value - a default value.
        Returns:
        the value with the specified key value.
      • getInteger

        public static Integer getInteger​(String key)
        Determines the integer value of the property with the specified name.
        Parameters:
        key - property name.
        Returns:
        the Integer value of the property.
      • getInteger

        public static Integer getInteger​(String key,
                                         int value)
        Determines the integer value of the property with the specified name.
        Parameters:
        key - property name.
        value - a default value.
        Returns:
        the Integer value of the property.
      • getLong

        public static Long getLong​(String key)
        Determines the integer value of the property with the specified name.
        Parameters:
        key - property name.
        Returns:
        the Integer value of the property.
      • getLong

        public static Long getLong​(String key,
                                   long value)
        Determines the long value of the property with the specified name.
        Parameters:
        key - property name.
        value - a default value.
        Returns:
        the Integer value of the property.
      • getBoolean

        public static boolean getBoolean​(String key)
        Determines the boolean value of the property with the specified name. The returned value is true if the property is defined and is equal, ignoring case, to the string "true".Otherwise, a false value is returned.
        Parameters:
        key - property name.
        Returns:
        the boolean value of the property.
      • putProperty

        public static void putProperty​(String name,
                                       String value)
        Adds a new property to the configuration.
        Parameters:
        name - property name.
        value - property value.