Class FileConfigReader
java.lang.Object
org.pipservices3.components.config.ConfigReader
org.pipservices3.components.config.FileConfigReader
- All Implemented Interfaces:
org.pipservices3.commons.config.IConfigurable,IConfigReader
- Direct Known Subclasses:
JsonConfigReader,YamlConfigReader
public abstract class FileConfigReader extends ConfigReader implements org.pipservices3.commons.config.IConfigurable
Abstract config reader that reads configuration from a file.
Child classes add support for config files in their specific format
like JSON, YAML or property files.
### Configuration parameters ###
- path: path to configuration file
- parameters: this entire section is used as template parameters
- ...
- See Also:
IConfigReader,ConfigReader
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FileConfigReader()Creates a new instance of the config reader.FileConfigReader(String path)Creates a new instance of the config reader. -
Method Summary
Methods inherited from class org.pipservices3.components.config.ConfigReader
parameterize, readConfig
-
Field Details
-
_path
-
-
Constructor Details
-
FileConfigReader
public FileConfigReader()Creates a new instance of the config reader. -
FileConfigReader
Creates a new instance of the config reader.- Parameters:
path- (optional) a path to configuration file.
-
-
Method Details
-
getPath
Get the path to configuration file..- Returns:
- the path to configuration file.
-
setPath
Set the path to configuration file.- Parameters:
value- a new path to configuration file.
-
configure
public void configure(org.pipservices3.commons.config.ConfigParams config)Configures component by passing configuration parameters.- Specified by:
configurein interfaceorg.pipservices3.commons.config.IConfigurable- Overrides:
configurein classConfigReader- Parameters:
config- configuration parameters to be set.
-