public class ConfigurationManager extends Object
ConfigurationManager
class is loaded, the configuration file is loaded and parsed, the DependencyGraph is cosntructed
and then resolved. If after the parameter evaluation there are still some parameters that were not resolved
the process stops and the Configuration manager will not be able to be used for all the parameters that were
declared in the configuration file. Since all configuration parameters are evaluated at startup and the default
behaviour for most parameters is to serve values that cannot be changed, the ConfigurationManager
does not perform any type of locking. One parameter though, ObjectParameter can be set to be shared.
This means that the same reference will be passed to any requestor of the parameter. In this case any kind of
locking that might be nessecary should be performed by the client code, or be handled withinthe objec itself.
Event though a client might change the value of an ObjectParameter field, this change is not reflected
in the configuration file. If the ConfigurationManager is reinitialized, the change made to the object's
field are not mirrored.
TODO Rethink the way the configuration file is found| Constructor and Description |
|---|
ConfigurationManager() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
GetBooleanParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static Byte |
GetByteParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static Double |
GetDoubleParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static Float |
GetFloatParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static File |
GetGonfigurationFile()
Retrieves the configuration file the
ConfigurationManager is using |
static Integer |
GetIntegerParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static Long |
GetLongParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static Object |
GetParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static Short |
GetShortParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
static String |
GetStringParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal
parameter.
|
public static File GetGonfigurationFile()
ConfigurationManager is usingpublic static Object GetParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Boolean GetBooleanParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Byte GetByteParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Double GetDoubleParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Float GetFloatParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Integer GetIntegerParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Long GetLongParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static Short GetShortParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typepublic static String GetStringParameter(String ParameterName) throws Exception
ParameterName - the name of the parameterException - The parameter is not defined of the value is not of the expected typeCopyright © 2018. All Rights Reserved.