public final class JPPFConfiguration extends Object
The configuration file path is set through the system property CONFIG_PROPERTY
,
whose value is "jppf.config".
As an example, it can be configured by adding the JVM argument "-Djppf.config=jppf-config.properties".
Modified to allow users to get configuration properties from an alternate source. Any user-provided class that
implements JPPFConfiguration.ConfigurationSource
and returns a stream with the same configuration values provided in the properties file.
The configuration source must then configured via the system property -Djppf.config.plugin = mypackage.MyConfigurationSource"
Modifier and Type | Class and Description |
---|---|
static interface |
JPPFConfiguration.ConfigurationSource
Implement this interface to provide an alternate configuration source via an
InputStream . |
static interface |
JPPFConfiguration.ConfigurationSourceReader
Implement this interface to provide an alternate configuration source via a
Reader . |
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PLUGIN_PROPERTY
The name of the system property used to specified an alternate JPPF configuration source.
|
static String |
CONFIG_PROPERTY
Name of the system property holding the location of the JPPF configuration file.
|
static String |
DEFAULT_FILE
Default location of the JPPF configuration file.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(JPPFProperty<T> property)
Get the value of a predefined property.
|
static TypedProperties |
getProperties()
Get the configuration properties.
|
static <T> T |
remove(JPPFProperty<T> property)
Remove the predefined property.
|
static void |
reset()
Reset and reload the JPPF configuration.
|
static <T> TypedProperties |
set(JPPFProperty<T> property,
T value)
Set the value of a predefined property.
|
public static final String CONFIG_PROPERTY
public static final String CONFIG_PLUGIN_PROPERTY
public static final String DEFAULT_FILE
public static TypedProperties getProperties()
public static <T> T get(JPPFProperty<T> property)
JPPFConfiguration.getProperties().get(property)
.T
- the type of the property.property
- the property whose value to retrieve.public static <T> TypedProperties set(JPPFProperty<T> property, T value)
JPPFConfiguration.getProperties().set(property, value)
.T
- the type of the property.property
- the property whose value to set.value
- the value to set.TypedProperties
instance in which the value is set.public static <T> T remove(JPPFProperty<T> property)
JPPFConfiguration.getProperties().remove(property)
.T
- the type of the property.property
- the property whose value to retrieve.public static void reset()
Copyright © 2005-2016 JPPF Team.