| Kea 3.0.2-git

netconf_controller.h
Go to the documentation of this file.
1// Copyright (C) 2018-2024 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_CONTROLLER_H
8#define NETCONF_CONTROLLER_H
9
10#include <netconf/netconf_process.h>
11#include <process/d_controller.h>
12
13 namespace isc {
14 namespace netconf {
15
21 class NetconfController : public process::DControllerBase {
22 public:
30 static process::DControllerBasePtr& instance();
31
33 virtual ~NetconfController() = default;
34
36 NetconfProcessPtr getNetconfProcess();
37
40 static const char* netconf_app_name_;
41
44 static const char* netconf_bin_name_;
45
50 isc::data::ConstElementPtr
51 parseFile(const std::string& name) override final;
52
58 void processSignal(int signum) override final;
59
60 private:
70 process::DProcessBase* createProcess() override final;
71
74 NetconfController();
75}; // NetconfController
76
77// @Defines a shared pointer to NetconfController
78using NetconfControllerPtr = std::shared_ptr<NetconfController>;
79
80} // namespace netconf
81} // namespace isc
82
83#endif // NETCONF_CONTROLLER_H
isc::netconf::NetconfController
Process Controller for Netconf Process.
Definition netconf_controller.h:21
isc::netconf::NetconfController::instance
static process::DControllerBasePtr & instance()
Static singleton instance method.
Definition netconf_controller.cc:29
isc::netconf::NetconfController::getNetconfProcess
NetconfProcessPtr getNetconfProcess()
Returns pointer to an instance of the underlying process object.
Definition netconf_controller.cc:67
isc::netconf::NetconfController::netconf_app_name_
static const char * netconf_app_name_
Defines the application name, this is passed into base class and appears in log statements.
Definition netconf_controller.h:40
isc::netconf::NetconfController::processSignal
void processSignal(int signum) override final
Redefined application-level signal processing method.
Definition netconf_controller.cc:41
isc::netconf::NetconfController::~NetconfController
virtual ~NetconfController()=default
Destructor.
isc::netconf::NetconfController::netconf_bin_name_
static const char * netconf_bin_name_
Defines the executable name.
Definition netconf_controller.h:44
isc::netconf::NetconfController::parseFile
isc::data::ConstElementPtr parseFile(const std::string &name) override final
Parses the configuration file using Netconf::ParserContext (bison).
Definition netconf_controller.cc:57
isc::process::DControllerBase
Application Controller.
Definition d_controller.h:103
isc::process::DControllerBase::createProcess
virtual DProcessBase * createProcess()=0
Abstract method that is responsible for instantiating the application process object.
isc::process::DProcessBase
Application Process Interface.
Definition d_process.h:75
d_controller.h
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
isc::netconf
Definition control_socket.cc:20
isc::netconf::NetconfProcessPtr
boost::shared_ptr< NetconfProcess > NetconfProcessPtr
Defines a shared pointer to NetconfProcess.
Definition netconf_process.h:99
isc::netconf::NetconfControllerPtr
std::shared_ptr< NetconfController > NetconfControllerPtr
Definition netconf_controller.h:78
isc::process::DControllerBasePtr
boost::shared_ptr< DControllerBase > DControllerBasePtr
Definition d_controller.h:78
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
netconf_process.h