Package org.jitsi.impl.configuration
Class PropertyConfigurationStore
- java.lang.Object
-
- org.jitsi.impl.configuration.HashtableConfigurationStore<Properties>
-
- org.jitsi.impl.configuration.PropertyConfigurationStore
-
- All Implemented Interfaces:
ConfigurationStore
public class PropertyConfigurationStore extends HashtableConfigurationStore<Properties>
Implements a ConfigurationStore which stores property name-value associations in a Properties instance and supports its serialization format for the configuration file of ConfigurationServiceImpl. Because of the Properties backend which can associate names only String values, instances of PropertyConfigurationStore convert property values to String using Object#toString().- Author:
- Lyubomir Marinov
-
-
Field Summary
-
Fields inherited from class org.jitsi.impl.configuration.HashtableConfigurationStore
properties
-
-
Constructor Summary
Constructors Constructor Description PropertyConfigurationStore()Initializes a new PropertyConfigurationStore instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreloadConfiguration(File file)ImplementsConfigurationStore.reloadConfiguration(File).voidsetNonSystemProperty(String name, Object value)voidstoreConfiguration(OutputStream out)-
Methods inherited from class org.jitsi.impl.configuration.HashtableConfigurationStore
getProperty, getPropertyNames, isSystemProperty, removeProperty, setSystemProperty
-
-
-
-
Method Detail
-
reloadConfiguration
public void reloadConfiguration(File file) throws IOException
ImplementsConfigurationStore.reloadConfiguration(File). Removes all property name-value associations currently present in this ConfigurationStore and deserializes new property name-value associations from a specific File which presumably is in the format represented by this instance.- Parameters:
file- the File to be read and to deserialize new property name-value associations from into this instance- Throws:
IOException- if there is an input error while reading from the specified file- See Also:
ConfigurationStore.reloadConfiguration(File)
-
setNonSystemProperty
public void setNonSystemProperty(String name, Object value)
OverridesHashtableConfigurationStore.setNonSystemProperty(String, Object). As the backend of this instance is a Properties instance, it can only store String values and the specified value to be associated with the specified property name is converted to a String.- Specified by:
setNonSystemPropertyin interfaceConfigurationStore- Overrides:
setNonSystemPropertyin classHashtableConfigurationStore<Properties>- Parameters:
name- the name of the non-system property to be set to the specified value in this ConfigurationStorevalue- the value to be assigned to the non-system property with the specified name in this ConfigurationStore- See Also:
ConfigurationStore.setNonSystemProperty(String, Object)
-
storeConfiguration
public void storeConfiguration(OutputStream out) throws IOException
ImplementsConfigurationStore.storeConfiguration(OutputStream). Stores/serializes the property name-value associations currently present in this ConfigurationStore into a specific OutputStream in the format represented by this instance.- Parameters:
out- the OutputStream to receive the serialized form of the property name-value associations currently present in this ConfigurationStore- Throws:
IOException- if there is an output error while storing the properties managed by this ConfigurationStore into the specified file- See Also:
ConfigurationStore.storeConfiguration(OutputStream)
-
-