Kea  1.9.9-git
ca_command_mgr.h
Go to the documentation of this file.
1 // Copyright (C) 2017-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 CTRL_AGENT_COMMAND_MGR_H
8 #define CTRL_AGENT_COMMAND_MGR_H
9 
11 #include <exceptions/exceptions.h>
12 #include <boost/noncopyable.hpp>
13 #include <boost/shared_ptr.hpp>
14 
15 namespace isc {
16 namespace agent {
17 
21 public:
22  CommandForwardingError(const char* file, size_t line, const char* what) :
23  isc::Exception(file, line, what) { };
24 };
25 
38  public boost::noncopyable {
39 public:
40 
42  static CtrlAgentCommandMgr& instance();
43 
62 
85  handleCommand(const std::string& cmd_name,
86  const isc::data::ConstElementPtr& params,
87  const isc::data::ConstElementPtr& original_cmd);
88 
89 private:
90 
101  forwardCommand(const std::string& service, const std::string& cmd_name,
102  const isc::data::ConstElementPtr& command);
103 
109 
110 };
111 
112 } // end of namespace isc::agent
113 } // end of namespace isc
114 
115 #endif
Exception thrown when an error occurred during control command forwarding.
virtual isc::data::ConstElementPtr processCommand(const isc::data::ConstElementPtr &cmd)
Triggers command processing.
static CtrlAgentCommandMgr & instance()
Returns sole instance of the Command Manager.
Command Manager which can delegate commands to a hook library.
Command Manager for Control Agent.
virtual isc::data::ConstElementPtr handleCommand(const std::string &cmd_name, const isc::data::ConstElementPtr &params, const isc::data::ConstElementPtr &original_cmd)
Handles the command having a given name and arguments.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
CommandForwardingError(const char *file, size_t line, const char *what)