public class SystemConfiguration extends MapConfiguration
map
Constructor and Description |
---|
SystemConfiguration()
Create a Configuration based on the system properties.
|
Modifier and Type | Method and Description |
---|---|
protected Iterator<String> |
getKeysInternal()
Actually creates an iterator for iterating over the keys in this
configuration.
|
static void |
setSystemProperties(Configuration systemConfig)
Set System properties from a configuration object.
|
static void |
setSystemProperties(String fileName)
Sets system properties from a file specified by its file name.
|
static void |
setSystemProperties(String basePath,
String fileName)
Sets system properties from a file specified using its base path and
file name.
|
addPropertyDirect, clearPropertyDirect, clone, containsKeyInternal, getMap, getPropertyInternal, isEmptyInternal, isTrimmingDisabled, setTrimmingDisabled, sizeInternal, toString
addErrorLogListener, addProperty, addPropertyInternal, append, beginRead, beginWrite, clear, clearInternal, clearProperty, cloneInterpolator, containsKey, copy, endRead, endWrite, get, get, getArray, getArray, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCollection, getCollection, getConfigurationDecoder, getConversionHandler, getDouble, getDouble, getDouble, getEncodedString, getEncodedString, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getKeys, getKeysInternal, getList, getList, getList, getList, getListDelimiterHandler, getLogger, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getSynchronizer, immutableSubset, initLogger, installInterpolator, interpolate, interpolate, interpolatedConfiguration, isEmpty, isScalarValue, isThrowExceptionOnMissing, lock, setConfigurationDecoder, setConversionHandler, setDefaultLookups, setInterpolator, setListDelimiterHandler, setLogger, setParentInterpolator, setPrefixLookups, setProperty, setPropertyInternal, setSynchronizer, setThrowExceptionOnMissing, size, subset, unlock
addEventListener, clearErrorListeners, clearEventListeners, copyEventListeners, createErrorEvent, createEvent, fireError, fireEvent, getEventListenerRegistrations, getEventListeners, isDetailEvents, removeEventListener, setDetailEvents
public SystemConfiguration()
System.getProperties()
public static void setSystemProperties(String fileName) throws ConfigurationException
setSystemProperties(null, fileName)
.fileName
- The name of the property file.ConfigurationException
- if an error occurs.public static void setSystemProperties(String basePath, String fileName) throws ConfigurationException
basePath
- The base path to look for the property file.fileName
- The name of the property file.ConfigurationException
- if an error occurs.public static void setSystemProperties(Configuration systemConfig)
systemConfig
- The configuration containing the properties to be set.protected Iterator<String> getKeysInternal()
getKeys()
, it has to be
defined by concrete subclasses. This implementation returns a snapshot of the keys in the
system properties. If another thread modifies system properties concurrently,
these changes are not reflected by the iterator returned by this method.getKeysInternal
in class MapConfiguration
Iterator
with all property keys in this configurationCopyright © 2001–2020 The Apache Software Foundation. All rights reserved.