Interface ConfigurationFactory
public interface ConfigurationFactory
A factory which returns the
Configuration
.- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescriptiondefault Configuration
Returns the configuration for the current context.default Configuration
Returns the configuration for the current context.static ConfigurationFactory
Returns the factory for the environment.int
priority()
The ranking priority for the this factory.
-
Method Details
-
getInstance
Returns the factory for the environment. The factory with the lowest priority will be selected.- Returns:
- the factory for the current environment
- Throws:
RuntimeException
- if the service loader could not find a factory
-
getConfiguration
Returns the configuration for the current context.- Returns:
- the configuration
-
getConfiguration
Returns the configuration for the current context.- Parameters:
config
- a configuration used to resolve default values, ifnull
a default resolver will be used- Returns:
- the configuration
-
priority
int priority()The ranking priority for the this factory. The lowest priority will be the one selected.- Returns:
- the priority
-