public class FileConfigProvider extends java.lang.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(java.util.Map<java.lang.String,?> configs)
Configure this class with the given key-value pairs
|
ConfigData |
get(java.lang.String path)
Retrieves the data at the given Properties file.
|
ConfigData |
get(java.lang.String path,
java.util.Set<java.lang.String> keys)
Retrieves the data with the given keys at the given Properties file.
|
protected java.io.Reader |
reader(java.lang.String path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
subscribe, unsubscribe, unsubscribeAll
public void configure(java.util.Map<java.lang.String,?> configs)
Configurable
configure
in interface Configurable
public ConfigData get(java.lang.String path)
get
in interface ConfigProvider
path
- the file where the data residespublic ConfigData get(java.lang.String path, java.util.Set<java.lang.String> keys)
get
in interface ConfigProvider
path
- the file where the data resideskeys
- the keys whose values will be retrievedprotected java.io.Reader reader(java.lang.String path) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable