7#ifndef BASE_COMMAND_MGR_H
8#define BASE_COMMAND_MGR_H
211 listCommandsHandler(
const std::string& name,
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Commands Manager, responsible for processing external commands.
HandlerContainer handlers_
Container for command handlers.
virtual isc::data::ConstElementPtr processCommand(const isc::data::ConstElementPtr &cmd)
Triggers command processing.
std::function< isc::data::ConstElementPtr(const std::string &name, const isc::data::ConstElementPtr ¶ms) CommandHandler)
Defines command handler type.
void registerCommand(const std::string &cmd, CommandHandler handler)
Registers specified command handler for a given command.
BaseCommandMgr()
Constructor.
static std::string getHash(const isc::data::ConstElementPtr &config)
returns a hash of a given Element structure
std::function< isc::data::ConstElementPtr(const std::string &name, const isc::data::ConstElementPtr ¶ms, const isc::data::ConstElementPtr &original) ExtendedCommandHandler)
Defines extended command handler type.
void deregisterAll()
Auxiliary method that removes all installed commands.
void registerExtendedCommand(const std::string &cmd, ExtendedCommandHandler handler)
Registers specified command handler for a given command.
virtual isc::data::ConstElementPtr handleCommand(const std::string &cmd_name, const isc::data::ConstElementPtr ¶ms, const isc::data::ConstElementPtr &original_cmd)
Handles the command having a given name and arguments.
virtual ~BaseCommandMgr()
Destructor.
std::map< std::string, HandlersPair > HandlerContainer
Type of the container for command handlers.
void deregisterCommand(const std::string &cmd)
Deregisters specified command handler.
Exception indicating that the handler specified is not valid.
InvalidCommandHandler(const char *file, size_t line, const char *what)
Exception indicating that the command name is not valid.
InvalidCommandName(const char *file, size_t line, const char *what)
boost::shared_ptr< const Element > ConstElementPtr
Defines the logger used by the top-level component of kea-lfc.
ExtendedCommandHandler extended_handler