ConfigurationListener¶
-
enum
ConfigurationEventType
¶ Values:
-
enumerator
CM_UPDATED
¶ The ConfigurationEvent type for when a Configuration object has been updated.
-
enumerator
CM_DELETED
¶ The ConfigurationEvent type for when a Configuration object has been removed.
-
enumerator
-
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
-
inline
ConfigurationEvent
(ServiceReference<ConfigurationAdmin> configAdmin, const ConfigurationEventType type, std::string factoryPid, std::string pid)¶
-
inline ServiceReference<ConfigurationAdmin> const &
getReference
() const noexcept¶ Get the ServiceReference object of the Configuration Admin Service that created this event.
- Return
the service reference of this ConfigurationEvent
-
inline std::string const &
getPid
() const noexcept¶ Get the PID of this ConfigurationEvent.
- Return
the PID of this ConfigurationEvent
-
inline std::string const &
getFactoryPid
() const noexcept¶ Get the Factory PID which is responsible for this Configuration.
- Return
the FactoryPID of this ConfigurationEvent
-
inline ConfigurationEventType
getType
() const noexcept¶ Get the type of this Configuration.
- Return
the ConfigurationEventType of this ConfigurationEvent
-
inline
-
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
(ConfigurationEvent const &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
() noexcept = default¶
-
virtual void