Package io.dropwizard.configuration
Interface ConfigurationFactory<T>
-
- All Known Implementing Classes:
BaseConfigurationFactory,JsonConfigurationFactory,POJOConfigurationFactory,YamlConfigurationFactory
public interface ConfigurationFactory<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tbuild()Loads, parses, binds, and validates a configuration object from an empty document.Tbuild(ConfigurationSourceProvider provider, String path)Loads, parses, binds, and validates a configuration object.default Tbuild(File file)Loads, parses, binds, and validates a configuration object from a file.
-
-
-
Method Detail
-
build
T build(ConfigurationSourceProvider provider, String path) throws IOException, ConfigurationException
Loads, parses, binds, and validates a configuration object.- Parameters:
provider- the provider to to use for reading configuration filespath- the path of the configuration file- Returns:
- a validated configuration object
- Throws:
IOException- if there is an error reading the fileConfigurationException- if there is an error parsing or validating the file
-
build
default T build(File file) throws IOException, ConfigurationException
Loads, parses, binds, and validates a configuration object from a file.- Parameters:
file- the path of the configuration file- Returns:
- a validated configuration object
- Throws:
IOException- if there is an error reading the fileConfigurationException- if there is an error parsing or validating the file
-
build
T build() throws IOException, ConfigurationException
Loads, parses, binds, and validates a configuration object from an empty document.- Returns:
- a validated configuration object
- Throws:
IOException- if there is an error reading the fileConfigurationException- if there is an error parsing or validating the file
-
-