hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCENotificationExecutor.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <sstream>
3 #include <Poco/Logger.h>
4 
6 #include "DRCEMessageConst.hpp"
7 
8 namespace HCE
9 {
10 namespace drce
11 {
12 //-----------------------------------------------------------------------------
13 void DRCENotificationExecutor::execute(const std::string& json)
14 {
15  if (notificationFunctor && !json.empty())
16  {
17  const std::string resultJson = notificationFunctor(json);
18  Poco::Logger::root().log(Poco::Message(drce_const::moduleName, "EXECUTE NOTIFICATION: "+json, Poco::Message::Priority::PRIO_TRACE));
19 
20  if (!resultJson.empty())
21  {
22  Poco::Logger::root().log(Poco::Message(drce_const::moduleName, "RETURN: "+resultJson, Poco::Message::Priority::PRIO_TRACE));
23  }
24  }
25 }
26 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
28 } // end namespace drce
29 } // end namespace HCE