public class JadicePropertiesConfiguration extends Object
jadice applications are usually accompanied by general jadice configuration settings. These settings are normally given by a configuration file Jadice.properties, which can be found in the default package of the jadice library.
It is mandatory to apply the configuration before using any other jadice functionality. The configuration has to be applied exactly once.
The usual use case is to load the configuration from the file Jadice.properties. This can be done
by calling configure()
. This method must be called exactly once at application startup time.
For advanced use cases it can be useful to load the configuration from a different source. Therefore the
parameterized configure methods can be used instead of configure()
.
Modifier and Type | Method and Description |
---|---|
static void |
configure()
Loads the configuration from the file Jadice.properties.
|
static void |
configure(File f)
Loads the configuration from the given
Properties file. |
static void |
configure(InputStream is)
Loads the configuration as
Properties (key and element pairs) from the given InputStream . |
static void |
configure(org.jadice.util.preferences.PreferenceStore ps)
Loads the configuration from the given
PreferenceStore . |
static void |
configure(Properties p)
Loads the configuration from the given
Properties . |
static void |
configure(String name)
Loads the configuration as a
Properties resource with given name. |
public static void configure()
Hint: Only one of the configure methods must be called exactly once at application startup time.
public static void configure(File f) throws IOException
Properties
file.
For more details about the properties format see Properties.load(InputStream)
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
f
- the file to loadIOException
public static void configure(String name) throws IOException
Properties
resource with given name.
For more details about the properties format see Properties.load(InputStream)
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
name
- the name of the resource to loadIOException
public static void configure(InputStream is) throws IOException
Properties
(key and element pairs) from the given InputStream
.
For more details about the properties format see Properties.load(InputStream)
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
is
- the stream to loadIOException
public static void configure(Properties p)
Properties
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
p
- the properties to loadpublic static void configure(org.jadice.util.preferences.PreferenceStore ps)
PreferenceStore
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
ps
- the PreferenceStore
to loadCopyright © 2024 levigo holding gmbh. All rights reserved.