|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.logging.log4j.core.config.ConfigurationFactory
public abstract class ConfigurationFactory
ConfigurationFactory allows the configuration implementation to be dynamically chosen in 1 of 3 ways:
| Nested Class Summary | |
|---|---|
static class |
ConfigurationFactory.ConfigurationSource
|
| Field Summary | |
|---|---|
static String |
CONFIGURATION_FACTORY_PROPERTY
Allow the ConfigurationFactory class to be specified as a system property. |
static String |
CONFIGURATION_FILE_PROPERTY
Allow the location of the configuration file to be specified as a system property. |
protected static String |
DEFAULT_PREFIX
File name prefix for standard configurations. |
protected static Logger |
LOGGER
Allow subclasses access to the status logger without creating another instance. |
protected static String |
TEST_PREFIX
File name prefix for test configurations. |
| Constructor Summary | |
|---|---|
ConfigurationFactory()
|
|
| Method Summary | |
|---|---|
abstract Configuration |
getConfiguration(ConfigurationFactory.ConfigurationSource source)
|
Configuration |
getConfiguration(String name,
URI configLocation)
Returns the Configuration. |
protected ConfigurationFactory.ConfigurationSource |
getInputFromResource(String resource,
ClassLoader loader)
Retrieve the configuration via the ClassLoader. |
protected ConfigurationFactory.ConfigurationSource |
getInputFromString(String config,
ClassLoader loader)
Load the configuration from the location represented by the String. |
protected ConfigurationFactory.ConfigurationSource |
getInputFromURI(URI configLocation)
Load the configuration from a URI. |
static ConfigurationFactory |
getInstance()
Returns the ConfigurationFactory. |
protected abstract String[] |
getSupportedTypes()
|
protected boolean |
isActive()
|
static void |
removeConfigurationFactory(ConfigurationFactory factory)
Remove the ConfigurationFactory. |
static void |
resetConfigurationFactory()
Reset the ConfigurationFactory to the default. |
static void |
setConfigurationFactory(ConfigurationFactory factory)
Set the configuration factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIGURATION_FACTORY_PROPERTY
public static final String CONFIGURATION_FILE_PROPERTY
protected static final Logger LOGGER
protected static final String TEST_PREFIX
protected static final String DEFAULT_PREFIX
| Constructor Detail |
|---|
public ConfigurationFactory()
| Method Detail |
|---|
public static ConfigurationFactory getInstance()
public static void setConfigurationFactory(ConfigurationFactory factory)
factory - the ConfigurationFactory.public static void resetConfigurationFactory()
public static void removeConfigurationFactory(ConfigurationFactory factory)
factory - The factory to remove.protected abstract String[] getSupportedTypes()
protected boolean isActive()
public abstract Configuration getConfiguration(ConfigurationFactory.ConfigurationSource source)
public Configuration getConfiguration(String name,
URI configLocation)
name - The configuration name.configLocation - The configuration location.
protected ConfigurationFactory.ConfigurationSource getInputFromURI(URI configLocation)
configLocation - A URI representing the location of the configuration.
protected ConfigurationFactory.ConfigurationSource getInputFromString(String config,
ClassLoader loader)
config - The configuration location.loader - The default ClassLoader to use.
protected ConfigurationFactory.ConfigurationSource getInputFromResource(String resource,
ClassLoader loader)
resource - The resource to load.loader - The default ClassLoader to use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||