Kea  1.9.9-git
netconf_process.h
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef NETCONF_PROCESS_H
8 #define NETCONF_PROCESS_H
9 
10 #include <netconf/netconf.h>
11 #include <process/d_process.h>
12 #include <vector>
13 #include <atomic>
14 
15 namespace isc {
16 namespace netconf {
17 
26 public:
33  NetconfProcess(const char* name, const asiolink::IOServicePtr& io_service);
34 
36  virtual ~NetconfProcess();
37 
45  virtual void init();
46 
50  virtual void run();
51 
67 
83  bool check_only = false);
84 
87 
89  static std::atomic<bool> shut_down;
90 
91 private:
92 
97  size_t runIO();
98 
100  NetconfAgent agent_;
101 };
102 
104 typedef boost::shared_ptr<NetconfProcess> NetconfProcessPtr;
105 
106 }; // namespace isc::netconf
107 }; // namespace isc
108 
109 #endif // NETCONF_PROCESS_H
static std::atomic< bool > shut_down
Global (globally visible) shutdown flag.
virtual isc::data::ConstElementPtr configure(isc::data::ConstElementPtr config_set, bool check_only=false)
Processes the given configuration.
virtual ~NetconfProcess()
Destructor.
virtual void init()
Initialize the Netconf process.
NetconfProcess(const char *name, const asiolink::IOServicePtr &io_service)
Constructor.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
virtual isc::data::ConstElementPtr shutdown(isc::data::ConstElementPtr args)
Initiates the process's shutdown process.
Kea Netconf Application Process.
Defines the logger used by the top-level component of kea-dhcp-ddns.
boost::shared_ptr< NetconfCfgMgr > NetconfCfgMgrPtr
Defines a shared pointer to NetconfCfgMgr.
boost::shared_ptr< NetconfProcess > NetconfProcessPtr
Defines a shared pointer to NetconfProcess.
Application Process Interface.
Definition: d_process.h:81
NetconfCfgMgrPtr getNetconfCfgMgr()
Returns a pointer to the configuration manager.
Netconf agent.
Definition: netconf.h:45
virtual void run()
Implements the process's event loop.