7 #ifndef BASE_COMMAND_MGR_H
8 #define BASE_COMMAND_MGR_H
143 ExtendedCommandHandler handler);
202 listCommandsHandler(
const std::string& name,
InvalidCommandHandler(const char *file, size_t line, const char *what)
void deregisterAll()
Auxiliary method that removes all installed commands.
std::map< std::string, HandlersPair > HandlerContainer
Type of the container for command handlers.
virtual ~BaseCommandMgr()
Destructor.
HandlerContainer handlers_
Container for command handlers.
void registerCommand(const std::string &cmd, CommandHandler handler)
Registers specified command handler for a given command.
void registerExtendedCommand(const std::string &cmd, ExtendedCommandHandler handler)
Registers specified command handler for a given command.
void deregisterCommand(const std::string &cmd)
Deregisters specified command handler.
ExtendedCommandHandler extended_handler
boost::shared_ptr< const Element > ConstElementPtr
InvalidCommandName(const char *file, size_t line, const char *what)
Commands Manager, responsible for processing external commands.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Exception indicating that the command name is not valid.
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.
virtual isc::data::ConstElementPtr processCommand(const isc::data::ConstElementPtr &cmd)
Triggers command processing.
Exception indicating that the handler specified is not valid.
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.
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.
BaseCommandMgr()
Constructor.
std::function< isc::data::ConstElementPtr(const std::string &name, const isc::data::ConstElementPtr ¶ms)> CommandHandler
Defines command handler type.