A bundle registers a {@code ConfigurationPlugin} object in order to processconfiguration updates before they reach the Managed Service or Managed Service Factory. The Configuration Admin service will detect registrations of Configuration Plugin services and must call these services every time before it calls the {@code ManagedService} or {@code ManagedServiceFactory}{@code updated} method. The Configuration Plugin service thus has theopportunity to view and modify the properties before they are passed to the Managed Service or Managed Service Factory.
Configuration Plugin (plugin) services have full read/write access to all configuration information that passes through them.
The {@code Integer} {@code service.cmRanking} registration property may bespecified. Not specifying this registration property, or setting it to something other than an {@code Integer}, is the same as setting it to the {@code Integer} zero. The {@code service.cmRanking} property determines theorder in which plugins are invoked. Lower ranked plugins are called before higher ranked ones. In the event of more than one plugin having the same value of {@code service.cmRanking}, then the Configuration Admin service arbitrarily chooses the order in which they are called.
By convention, plugins with {@code service.cmRanking < 0} or{@code service.cmRanking> 1000} should not make modifications to theproperties.
The Configuration Admin service has the right to hide properties from plugins, or to ignore some or all the changes that they make. This might be done for security reasons. Any such behavior is entirely implementation defined.
A plugin may optionally specify a {@code cm.target} registration propertywhose value is the PID of the Managed Service or Managed Service Factory whose configuration updates the plugin is intended to intercept. The plugin will then only be called with configuration updates that are targeted at the Managed Service or Managed Service Factory with the specified PID. Omitting the {@code cm.target} registration property means that the plugin is calledfor all configuration updates. @author $Id: 36cd6f091c1bb1726305702c57845ba419ca0a49 $
|
|
|
|
|
|
|
|
|
|