Enum SaAgentConfig

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SaAgentConfig>

    public enum SaAgentConfig
    extends java.lang.Enum<SaAgentConfig>
    This class is responsible to read the system configurations.
    Since:
    8.0.1
    Author:
    Pritam Biswas
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFAULT  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getBooleanProperty​(java.lang.String key, boolean defaultValue)
      Get the value of a property as a boolean
      int getIntegerProperty​(java.lang.String key, int defaultValue)
      Get the value of a property as an integer
      java.lang.String getProperty​(java.lang.String key)
      Get the property by key and returns the corresponding value as String
      java.lang.String getProperty​(java.lang.String key, java.lang.String defaultValue)
      Get the property by key and return the corresponding value as String.
      static SaAgentConfig valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SaAgentConfig[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static SaAgentConfig[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SaAgentConfig c : SaAgentConfig.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SaAgentConfig valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Get the property by key and returns the corresponding value as String
        Parameters:
        key -
        Returns:
        The value or null if not found
      • getProperty

        public java.lang.String getProperty​(java.lang.String key,
                                            java.lang.String defaultValue)
        Get the property by key and return the corresponding value as String. Return defaultValue if not found
        Parameters:
        key -
        Returns:
        The corresponding value or the default value if not found
      • getBooleanProperty

        public boolean getBooleanProperty​(java.lang.String key,
                                          boolean defaultValue)
        Get the value of a property as a boolean
        Parameters:
        key -
        defaultValue -
        Returns:
        The corresponding value or default value if not found
      • getIntegerProperty

        public int getIntegerProperty​(java.lang.String key,
                                      int defaultValue)
        Get the value of a property as an integer
        Parameters:
        key -
        defaultValue -
        Returns:
        The corresponding value or default value if not found