Fledge
An open source edge computing platform for industrial users
ConfigHandler Class Reference

Handler class within a service to manage configuration changes. More...

#include <config_handler.h>

Collaboration diagram for ConfigHandler:

Public Member Functions

void configChange (const std::string &category, const std::string &config)
 Handle a callback from the core to propagate a configuration category change and propagate that to all the local ServiceHandlers that have registered for it. More...
 
void configChildCreate (const std::string &parent_category, const std::string &child_category, const std::string &config)
 Handle a callback from the core to handle the creation of a child category. More...
 
void configChildDelete (const std::string &parent_category, const std::string &child_category)
 Handle a callback from the core to handle the deletion of a child category. More...
 
void registerCategory (ServiceHandler *handler, const std::string &category)
 Register a service handler for a given configuration category. More...
 
void registerCategoryChild (ServiceHandler *handler, const std::string &category)
 Register a service handler for a given configuration category when a children category is changed. More...
 
void unregisterCategory (ServiceHandler *handler, const std::string &category)
 Unregister a configuration category from the ConfigHandler for a particular registered ServiceHandler class. More...
 

Static Public Member Functions

static ConfigHandlergetInstance (ManagementClient *)
 ConfigHandler Singleton implementation.
 

Static Public Attributes

static ConfigHandlerinstance = 0
 

Detailed Description

Handler class within a service to manage configuration changes.

Member Function Documentation

◆ configChange()

void ConfigHandler::configChange ( const std::string &  category,
const std::string &  config 
)

Handle a callback from the core to propagate a configuration category change and propagate that to all the local ServiceHandlers that have registered for it.

Parameters
categoryThe name of the category that has changed
configThe configuration category itself

◆ configChildCreate()

void ConfigHandler::configChildCreate ( const std::string &  parent_category,
const std::string &  child_category,
const std::string &  config 
)

Handle a callback from the core to handle the creation of a child category.

Parameters
parent_categoryThe parent category of the child
child_categoryThe name of the category that has created
configConfiguration of the child category

◆ configChildDelete()

void ConfigHandler::configChildDelete ( const std::string &  parent_category,
const std::string &  child_category 
)

Handle a callback from the core to handle the deletion of a child category.

Parameters
parent_categoryThe parent category of the child
child_categoryThe name of the category that has created

◆ registerCategory()

void ConfigHandler::registerCategory ( ServiceHandler handler,
const std::string &  category 
)

Register a service handler for a given configuration category.

Parameters
handlerThe service handler to call
categoryThe configuration category to register

◆ registerCategoryChild()

void ConfigHandler::registerCategoryChild ( ServiceHandler handler,
const std::string &  category 
)

Register a service handler for a given configuration category when a children category is changed.

Parameters
handlerThe service handler to call
categoryThe configuration category to register

◆ unregisterCategory()

void ConfigHandler::unregisterCategory ( ServiceHandler handler,
const std::string &  category 
)

Unregister a configuration category from the ConfigHandler for a particular registered ServiceHandler class.

Parameters
handlerThe configuration handler we would call
categoryThe category to remove.

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