Package org.jppf.jmx
Class JMXEnvHelper
java.lang.Object
org.jppf.jmx.JMXEnvHelper
- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBoolean(JPPFProperty<Boolean> prop, Map<String, ?> env, TypedProperties config) Get the value of a property of typeboolean.static intgetInt(JPPFProperty<Integer> prop, Map<String, ?> env, TypedProperties config) Get the value of a property of typeint.static longgetLong(JPPFProperty<Long> prop, Map<String, ?> env, TypedProperties config) Get the value of a property of typelong.static StringgetString(JPPFProperty<String> prop, Map<String, ?> env, TypedProperties config) Get the value of a property of typeString.static boolean
-
Constructor Details
-
JMXEnvHelper
public JMXEnvHelper()
-
-
Method Details
-
getLong
Get the value of a property of typelong. 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 benull.config- JPPF configuration, may benull.- Returns:
- the value of the property if the property is found, or the property's default value if it is not found.
-
getInt
Get the value of a property of typeint. 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 benull.config- JPPF configuration, may benull.- 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 typeboolean. 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 benull.config- JPPF configuration, may benull.- 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 typeString. 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 benull.config- JPPF configuration, may benull.- 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.
-