ConfigurationListener¶
-
enum
gr_configurationlistener::
ConfigurationEventType
¶ Values:
-
CM_UPDATED
= 1¶ The ConfigurationEvent type for when a Configuration object has been updated.
-
CM_DELETED
= 2¶ The ConfigurationEvent type for when a Configuration object has been removed.
-
-
class
cppmicroservices::service::cm::
ConfigurationEvent
¶ - #include <cppmicroservices/cm/ConfigurationListener.hpp>
The ConfigurationEvent object is passed to the ConfigurationListener when the configuration object for any service is updated or removed by ConfigurationAdmin.
Public Functions
-
ConfigurationEvent
(const ServiceReference<ConfigurationAdmin> configAdmin, const ConfigurationEventType type, const std::string factoryPid, const std::string pid)¶
-
const ServiceReference<ConfigurationAdmin> &
getReference
() const¶ Get the ServiceReference object of the Configuration Admin Service that created this event.
- Return
- the service reference of this ConfigurationEvent
-
const std::string &
getPid
() const¶ Get the PID of this ConfigurationEvent.
- Return
- the PID of this ConfigurationEvent
-
const std::string &
getFactoryPid
() const¶ Get the Factory PID which is responsible for this Configuration.
- Return
- the FactoryPID of this ConfigurationEvent
-
ConfigurationEventType
getType
() const¶ Get the type of this Configuration.
- Return
- the ConfigurationEventType of this ConfigurationEvent
-
-
class
cppmicroservices::service::cm::
ConfigurationListener
¶ - #include <cppmicroservices/cm/ConfigurationListener.hpp>
The ConfigurationListener interface is the interface that Declarative Services implements to receive updates from the ConfigurationAdmin implementation for all configuration object updates.
ConfigurationAdmin sends updates for all configuration object updates. It is up to DS to determine if this is a configuration object associated with a service being managed by DS.
Public Functions
-
virtual void
configurationEvent
(const ConfigurationEvent &event) = 0¶ Called whenever the Configuration for any service is updated or removed from ConfigurationAdmin.
- Remark
- This class is threadsafe
- Parameters
ConfigurationEvent
: object containing the ConfigurationAdmin service reference of the ConfigurationAdmin service that updated the configuration object, the PID or FactoryPid for the configuration object and the type of the update operation (update or remove)
-
virtual
~ConfigurationListener
()¶
-
virtual void