public class FileConfigProvider extends Object implements ConfigProvider
ConfigProvider
that represents a Properties file.
All property keys and values are stored as cleartext.Modifier and Type | Field and Description |
---|---|
static String |
ALLOWED_PATHS_CONFIG |
static String |
ALLOWED_PATHS_DOC |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
subscribe, unsubscribe, unsubscribeAll
public static final String ALLOWED_PATHS_CONFIG
public static final String ALLOWED_PATHS_DOC
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 retrievedpublic void close()
close
in interface Closeable
close
in interface AutoCloseable