client-cpp  0.10.0
kaa::ConfigurationManager Class Reference

#include <ConfigurationManager.hpp>

+ Inheritance diagram for kaa::ConfigurationManager:
+ Collaboration diagram for kaa::ConfigurationManager:

Public Member Functions

 ConfigurationManager (IKaaClientContext &context)
 
virtual void init ()
 
virtual void processConfigurationData (const std::vector< std::uint8_t > &data, bool fullResync)
 
virtual void addReceiver (IConfigurationReceiver &receiver)
 
virtual void removeReceiver (IConfigurationReceiver &receiver)
 
virtual const
KaaRootConfiguration & 
getConfiguration ()
 
virtual void setConfigurationStorage (IConfigurationStoragePtr storage)
 
virtual IConfigurationProcessorgetConfigurationProcessor ()
 
virtual
IConfigurationHashContainer
getConfigurationHashContainer ()
 
virtual EndpointObjectHash getConfigurationHash ()
 
virtual ~ConfigurationManager () noexcept
 
- Public Member Functions inherited from kaa::IConfigurationManager
virtual ~IConfigurationManager ()=default
 
- Public Member Functions inherited from kaa::IConfigurationProcessor
virtual ~IConfigurationProcessor ()=default
 
- Public Member Functions inherited from kaa::IConfigurationHashContainer
virtual ~IConfigurationHashContainer ()=default
 

Detailed Description

This class is responsible for correct configuration delta merging and contains root configuration tree. notifies registered observers (derived from IConfigurationReceiver) with root configuration object presented as KaaRootConfiguration.

Definition at line 42 of file ConfigurationManager.hpp.

Constructor & Destructor Documentation

kaa::ConfigurationManager::ConfigurationManager ( IKaaClientContext context)
virtual kaa::ConfigurationManager::~ConfigurationManager ( )
inlinevirtualnoexcept

Definition at line 73 of file ConfigurationManager.hpp.

Member Function Documentation

virtual void kaa::ConfigurationManager::addReceiver ( IConfigurationReceiver receiver)
virtual

Subscribes listener of configuration updates.

Parameters
receiverListener to be added to notification list.

Implements kaa::IConfigurationManager.

virtual const KaaRootConfiguration& kaa::ConfigurationManager::getConfiguration ( )
virtual

Returns full configuration tree which is actual at current moment.

Returns
ICommonRecord containing current configuration tree.

Implements kaa::IConfigurationManager.

virtual EndpointObjectHash kaa::ConfigurationManager::getConfigurationHash ( )
inlinevirtual

Retrieves configuration data hash.

See Also
EndpointObjectHash

Implements kaa::IConfigurationHashContainer.

Definition at line 68 of file ConfigurationManager.hpp.

virtual IConfigurationHashContainer& kaa::ConfigurationManager::getConfigurationHashContainer ( )
inlinevirtual

Implements kaa::IConfigurationManager.

Definition at line 63 of file ConfigurationManager.hpp.

virtual IConfigurationProcessor& kaa::ConfigurationManager::getConfigurationProcessor ( )
inlinevirtual

Implements kaa::IConfigurationManager.

Definition at line 58 of file ConfigurationManager.hpp.

virtual void kaa::ConfigurationManager::init ( )
virtual
virtual void kaa::ConfigurationManager::processConfigurationData ( const std::vector< std::uint8_t > &  data,
bool  fullResync 
)
virtual

Routine for processing received configuration data.

Parameters
dataPointer to a memory where configuration data is placed.
data_lengthSize of configuration data.
full_resuncSignals if data contains full configuration resync or partial update

Implements kaa::IConfigurationProcessor.

virtual void kaa::ConfigurationManager::removeReceiver ( IConfigurationReceiver receiver)
virtual

Unsubscribes listener of configuration updates.

Parameters
receiverListener to be removed from notification list.

Implements kaa::IConfigurationManager.

virtual void kaa::ConfigurationManager::setConfigurationStorage ( IConfigurationStoragePtr  storage)
virtual

Provide storage object which is able to persist encoded configuration data.

Parameters
storageObject which will save and load configuration data
See Also
ConfigurationStorage

Implements kaa::IConfigurationManager.


The documentation for this class was generated from the following file: