Kea 2.7.5
ca_process.h
Go to the documentation of this file.
1// Copyright (C) 2016-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 CTRL_AGENT_PROCESS_H
8#define CTRL_AGENT_PROCESS_H
9
10#include <agent/ca_cfg_mgr.h>
11#include <http/listener.h>
12#include <process/d_process.h>
13#include <vector>
14
15namespace isc {
16namespace agent {
17
33public:
40 CtrlAgentProcess(const char* name, const asiolink::IOServicePtr& io_service);
41
43 virtual ~CtrlAgentProcess();
44
52 virtual void init();
53
57 virtual void run();
58
74
107 bool check_only = false);
108
111
118
122 bool isListening() const;
123
124private:
125
131 // a result of the reconfiguration). If there are no listeners additional
136 void garbageCollectListeners(size_t leaving = 1);
137
142 size_t runIO();
143
145 std::vector<http::HttpListenerPtr> http_listeners_;
146
147};
148
150typedef boost::shared_ptr<CtrlAgentProcess> CtrlAgentProcessPtr;
151
152} // namespace isc::agent
153} // namespace isc
154
155#endif // CTRL_AGENT_PROCESS_H
Kea Control Agent Application Process.
Definition ca_process.h:32
bool isListening() const
Checks if the process is listening to the HTTP requests.
virtual isc::data::ConstElementPtr shutdown(isc::data::ConstElementPtr args)
Initiates the process's shutdown process.
virtual ~CtrlAgentProcess()
Destructor.
Definition ca_process.cc:36
http::ConstHttpListenerPtr getHttpListener() const
Returns a const pointer to the HTTP listener used by the process.
CtrlAgentProcess(const char *name, const asiolink::IOServicePtr &io_service)
Constructor.
Definition ca_process.cc:30
virtual void init()
Initialize the Control Agent process.
Definition ca_process.cc:41
CtrlAgentCfgMgrPtr getCtrlAgentCfgMgr()
Returns a pointer to the configuration manager.
virtual isc::data::ConstElementPtr configure(isc::data::ConstElementPtr config_set, bool check_only=false)
Processes the given configuration.
virtual void run()
Implements the process's event loop.
Definition ca_process.cc:45
Application Process Interface.
Definition d_process.h:75
boost::shared_ptr< CtrlAgentProcess > CtrlAgentProcessPtr
Defines a shared pointer to CtrlAgentProcess.
Definition ca_process.h:150
boost::shared_ptr< CtrlAgentCfgMgr > CtrlAgentCfgMgrPtr
Defines a shared pointer to CtrlAgentCfgMgr.
Definition ca_cfg_mgr.h:311
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
boost::shared_ptr< const HttpListener > ConstHttpListenerPtr
Pointer to the const HttpListener.
Definition listener.h:153
Defines the logger used by the top-level component of kea-lfc.