public class GetConfigurationProperties extends Object implements Callable<Dictionary<String,Object>>
Callable
that retrieves the properties of a Configuration
object. The search is
done by looking for the Configuration
object that has a property set to a specific value.
If multiple objects match the criteria, an IllegalArgumentException
will be thrown. For
that reason, care should be taken to use a property name whose value is known to be unique.Constructor and Description |
---|
GetConfigurationProperties(org.osgi.service.cm.ConfigurationAdmin configAdmin,
String propertyName,
String propertyValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Dictionary<String,Object> |
call()
Retrieves the
Configuration object's properties. |
public GetConfigurationProperties(org.osgi.service.cm.ConfigurationAdmin configAdmin, String propertyName, String propertyValue)
configAdmin
- reference to the container's ConfigurationAdmin
propertyName
- name of the property to use for the searchpropertyValue
- property value to search forpublic Dictionary<String,Object> call() throws Exception
Configuration
object's properties.call
in interface Callable<Dictionary<String,Object>>
Configuration
object's properties. null
if the Configuration
object does not exist or has no properties.IllegalArgumentException
- thrown if multiple Configuration
objects match the
search criteria, i.e., have the same property name/value pairException
- thrown for any other reasonsThis work is licensed under a Creative Commons Attribution 4.0 International License.