public class FileConfigProvider extends Object implements ConfigProvider
ConfigProvider
that represents a Properties file.
All property keys and values are stored as cleartext.Constructor and Description |
---|
FileConfigProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(Map<String,?> configs)
Configure this class with the given key-value pairs
|
ConfigData |
get(String path)
Retrieves the data at the given Properties file.
|
ConfigData |
get(String path,
Set<String> keys)
Retrieves the data with the given keys at the given Properties file.
|
protected Reader |
reader(String path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
subscribe, unsubscribe, unsubscribeAll
public void configure(Map<String,?> configs)
Configurable
configure
in interface Configurable
public ConfigData get(String path)
get
in interface ConfigProvider
path
- the file where the data residespublic ConfigData get(String path, Set<String> keys)
get
in interface ConfigProvider
path
- the file where the data resideskeys
- the keys whose values will be retrievedprotected Reader reader(String path) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable