Package org.apache.felix.cm.impl
Class ConfigurationAdapter
java.lang.Object
org.apache.felix.cm.impl.ConfigurationAdapter
- All Implemented Interfaces:
org.osgi.service.cm.Configuration
The
ConfigurationAdapter is just an adapter to the internal
configuration object. Instances of this class are returned as Configuration
objects to the client, where each caller gets a fresh instance of this
class while internal Configuration objects are shared.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.osgi.service.cm.Configuration
org.osgi.service.cm.Configuration.ConfigurationAttribute -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConfigurationAdminImplprivate final ConfigurationImpl -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationAdapter(ConfigurationAdminImpl configurationAdmin, ConfigurationImpl delegatee) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributes(org.osgi.service.cm.Configuration.ConfigurationAttribute... attrs) private voidChecks whether this configuration object is backed by an active Configuration Admin Service (ConfigurationManager here).private voidChecks whether this configuration object has already been deleted.private voidChecks whether this configuration object is locked.voiddelete()booleanSet<org.osgi.service.cm.Configuration.ConfigurationAttribute> longgetPid()getProcessedProperties(org.osgi.framework.ServiceReference<?> sr) inthashCode()voidremoveAttributes(org.osgi.service.cm.Configuration.ConfigurationAttribute... attrs) voidsetBundleLocation(String bundleLocation) toString()voidupdate()voidupdate(Dictionary<String, ?> properties) booleanupdateIfDifferent(Dictionary<String, ?> properties)
-
Field Details
-
configurationAdmin
-
delegatee
-
-
Constructor Details
-
ConfigurationAdapter
ConfigurationAdapter(ConfigurationAdminImpl configurationAdmin, ConfigurationImpl delegatee)
-
-
Method Details
-
getPid
- Specified by:
getPidin interfaceorg.osgi.service.cm.Configuration- See Also:
-
getFactoryPid
- Specified by:
getFactoryPidin interfaceorg.osgi.service.cm.Configuration- See Also:
-
getBundleLocation
- Specified by:
getBundleLocationin interfaceorg.osgi.service.cm.Configuration- See Also:
-
setBundleLocation
- Specified by:
setBundleLocationin interfaceorg.osgi.service.cm.Configuration- Parameters:
bundleLocation-- See Also:
-
update
- Specified by:
updatein interfaceorg.osgi.service.cm.Configuration- Throws:
IOException- See Also:
-
update
- Specified by:
updatein interfaceorg.osgi.service.cm.Configuration- Parameters:
properties-- Throws:
IOException- See Also:
-
getProperties
- Specified by:
getPropertiesin interfaceorg.osgi.service.cm.Configuration
-
getChangeCount
public long getChangeCount()- Specified by:
getChangeCountin interfaceorg.osgi.service.cm.Configuration
-
delete
- Specified by:
deletein interfaceorg.osgi.service.cm.Configuration- Throws:
IOException- See Also:
-
updateIfDifferent
- Specified by:
updateIfDifferentin interfaceorg.osgi.service.cm.Configuration- Throws:
IOException- See Also:
-
addAttributes
public void addAttributes(org.osgi.service.cm.Configuration.ConfigurationAttribute... attrs) throws IOException - Specified by:
addAttributesin interfaceorg.osgi.service.cm.Configuration- Throws:
IOException- See Also:
-
getAttributes
- Specified by:
getAttributesin interfaceorg.osgi.service.cm.Configuration- See Also:
-
removeAttributes
public void removeAttributes(org.osgi.service.cm.Configuration.ConfigurationAttribute... attrs) throws IOException - Specified by:
removeAttributesin interfaceorg.osgi.service.cm.Configuration- Throws:
IOException- See Also:
-
getProcessedProperties
- Specified by:
getProcessedPropertiesin interfaceorg.osgi.service.cm.Configuration- See Also:
-
hashCode
public int hashCode() -
equals
-
toString
-
checkActive
private void checkActive()Checks whether this configuration object is backed by an active Configuration Admin Service (ConfigurationManager here).- Throws:
IllegalStateException- If this configuration object is not backed by an active ConfigurationManager
-
checkDeleted
private void checkDeleted()Checks whether this configuration object has already been deleted.- Throws:
IllegalStateException- If this configuration object has been deleted.
-
checkLocked
Checks whether this configuration object is locked.- Throws:
org.osgi.service.cm.ReadOnlyConfigurationException- If this configuration object is locked.IOException
-