public interface ConfigurationPersistencePlugin
Interacting with a Configuration object at the ConfigurationPersistencePlugin
(or similar) level has restrictions and side effects:
ConfigurationAdmin but instead should utilize an API-provided ConfigurationContext to perform allowed configuration operations.| Modifier and Type | Method and Description |
|---|---|
void |
handleDelete(String pid)
Given the pid of a configuration about to be deleted, perform processing before the
configuration is deleted.
|
void |
handleStore(ConfigurationContext context)
Given the
ConfigurationContext of a configuration about to be written, perform
processing before the results get stored. |
void |
initialize(Set<ConfigurationContext> state)
Provide an initialization hook for synchronous resource allocation after a plugin is
available to be called, unlike an OSGi life-cycle
init() method, which is called prior
to the service becoming available. |
void initialize(Set<ConfigurationContext> state)
init() method, which is called prior
to the service becoming available.state - the current configuration state of the system.void handleStore(ConfigurationContext context) throws IOException
ConfigurationContext of a configuration about to be written, perform
processing before the results get stored.context - an object of relevant info that is safe to access during a config operation.IOException - to abort the configuration update operation and indicate to the user that
it failed.IllegalStateException - if configuration data disappeared or felix internal data was
otherwise corrupt.void handleDelete(String pid) throws IOException
pid - the service pid identifying the config object that will be deleted.IOException - to abort the configuration delete operation and indicate to the user that
it failed.This work is licensed under a Creative Commons Attribution 4.0 International License.