Package org.jppf.jmx

Class JMXEnvHelper

java.lang.Object
org.jppf.jmx.JMXEnvHelper

public class JMXEnvHelper extends Object
Author:
Laurent Cohen
  • Constructor Details

    • JMXEnvHelper

      public JMXEnvHelper()
  • Method Details

    • getLong

      public static long getLong(JPPFProperty<Long> prop, Map<String,?> env, TypedProperties config)
      Get the value of a property of type long. The lookup is performed in this order: environment, config, system properties.
      Parameters:
      prop - the property to look for.
      env - the environment passed to a JMX remote connector client or server, may be null.
      config - JPPF configuration, may be null.
      Returns:
      the value of the property if the property is found, or the property's default value if it is not found.
    • getInt

      public static int getInt(JPPFProperty<Integer> prop, Map<String,?> env, TypedProperties config)
      Get the value of a property of type int. The lookup is performed in this order: environment, config, system properties.
      Parameters:
      prop - the property to look for.
      env - the environment passed to a JMX remote connector client or server, may be null.
      config - JPPF configuration, may be null.
      Returns:
      the value of the property if the property is found, or the property's default value if it is not found.
    • getBoolean

      public static boolean getBoolean(JPPFProperty<Boolean> prop, Map<String,?> env, TypedProperties config)
      Get the value of a property of type boolean. The lookup is performed in this order: environment, config, system properties.
      Parameters:
      prop - the property to look for.
      env - the environment passed to a JMX remote connector client or server, may be null.
      config - JPPF configuration, may be null.
      Returns:
      the value of the property if the property is found, or the property's default value if it is not found.
    • getString

      public static String getString(JPPFProperty<String> prop, Map<String,?> env, TypedProperties config)
      Get the value of a property of type String. The lookup is performed in this order: environment, config, system properties.
      Parameters:
      prop - the property to look for.
      env - the environment passed to a JMX remote connector client or server, may be null.
      config - JPPF configuration, may be null.
      Returns:
      the value of the property if the property is found, or the property's default value if it is not found.
    • isAsyncLoggingEnabled

      public static boolean isAsyncLoggingEnabled()
      Returns:
      whether asynchronous logging is enabled.