Kea  1.5.0
ca_process.h
Go to the documentation of this file.
1 // Copyright (C) 2016-2017 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 
15 namespace isc {
16 namespace agent {
17 
33 public:
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 
124 private:
125 
131  // a result of the reconfiguration). If there are no listeners additional
133  void garbageCollectListeners();
134 
139  size_t runIO();
140 
142  std::vector<http::HttpListenerPtr> http_listeners_;
143 
144 };
145 
147 typedef boost::shared_ptr<CtrlAgentProcess> CtrlAgentProcessPtr;
148 
149 }; // namespace isc::agent
150 }; // namespace isc
151 
152 #endif // CTRL_AGENT_PROCESS_H
isc::agent::CtrlAgentProcess::run
virtual void run()
Implements the process's event loop.
Definition: ca_process.cc:43
d_process.h
isc::http::ConstHttpListenerPtr
boost::shared_ptr< const HttpListener > ConstHttpListenerPtr
Pointer to the const HttpListener.
Definition: listener.h:140
isc::agent::CtrlAgentProcess::configure
virtual isc::data::ConstElementPtr configure(isc::data::ConstElementPtr config_set, bool check_only=false)
Processes the given configuration.
Definition: ca_process.cc:103
ca_cfg_mgr.h
isc::agent::CtrlAgentProcess::CtrlAgentProcess
CtrlAgentProcess(const char *name, const asiolink::IOServicePtr &io_service)
Constructor.
Definition: ca_process.cc:29
isc::agent::CtrlAgentCfgMgrPtr
boost::shared_ptr< CtrlAgentCfgMgr > CtrlAgentCfgMgrPtr
Defines a shared pointer to CtrlAgentCfgMgr.
Definition: ca_cfg_mgr.h:208
isc::agent::CtrlAgentProcess::shutdown
virtual isc::data::ConstElementPtr shutdown(isc::data::ConstElementPtr args)
Initiates the process's shutdown process.
Definition: ca_process.cc:97
listener.h
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::agent::CtrlAgentProcess::isListening
bool isListening() const
Checks if the process is listening to the HTTP requests.
Definition: ca_process.cc:210
isc::agent::CtrlAgentProcess::~CtrlAgentProcess
virtual ~CtrlAgentProcess()
Destructor.
Definition: ca_process.cc:35
isc::process::DProcessBase
Application Process Interface.
Definition: d_process.h:67
isc::agent::CtrlAgentProcess::getCtrlAgentCfgMgr
CtrlAgentCfgMgrPtr getCtrlAgentCfgMgr()
Returns a pointer to the configuration manager.
Definition: ca_process.cc:198
isc::agent::CtrlAgentProcessPtr
boost::shared_ptr< CtrlAgentProcess > CtrlAgentProcessPtr
Defines a shared pointer to CtrlAgentProcess.
Definition: ca_process.h:147
isc::agent::CtrlAgentProcess::init
virtual void init()
Initialize the Control Agent process.
Definition: ca_process.cc:39
isc::agent::CtrlAgentProcess
Kea Control Agent Application Process.
Definition: ca_process.h:32
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
isc::agent::CtrlAgentProcess::getHttpListener
http::ConstHttpListenerPtr getHttpListener() const
Returns a const pointer to the HTTP listener used by the process.
Definition: ca_process.cc:203