- #include <cppmicroservices/cm/ManagedService.hpp>
The ManagedService interface is the interface that services should implement to receive updates from the ConfigurationAdmin implementation with their Configuration.
The Configuration will be provided based on the service.pid ServiceProperty of the Service being registered with the CppMicroServices Framework. If this isn’t provided, the component.name property injected by DeclarativeServices will be used instead. If no Configuration is available for either of these, an empty AnyMap will be used to call Updated. Per the OSGi Spec, ManagedService is intended to be used for services which have singleton scope, where there will only be one implementation of a given interface.
Updated(const AnyMap &properties) = 0¶
Called whenever the Configuration for this service is updated or removed from ConfigurationAdmin, and when the ManagedService is first registered with the Framework, to provide the initial Configuration.
Can throw a ConfigurationException if there’s a problem with the properties. This exception will be logged by the ConfigurationAdminImpl to aid the application author’s investigation into the incorrect configuration.
Will be called asynchronously from the Service’s registration or an update to the Configuration.
ConfigurationException: if something is wrong with the properties provided.
properties: The properties from the new/initial Configuration for this ManagedService