7 #ifndef BASE_COMMAND_MGR_H 8 #define BASE_COMMAND_MGR_H 130 void registerCommand(
const std::string& cmd, CommandHandler handler);
142 void registerExtendedCommand(
const std::string& cmd,
143 ExtendedCommandHandler handler);
148 void deregisterCommand(
const std::string& cmd);
154 void deregisterAll();
174 handleCommand(
const std::string& cmd_name,
202 listCommandsHandler(
const std::string& name,
InvalidCommandHandler(const char *file, size_t line, const char *what)
std::map< std::string, HandlersPair > HandlerContainer
Type of the container for command handlers.
virtual ~BaseCommandMgr()
Destructor.
HandlerContainer handlers_
Container for command handlers.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
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.
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-lfc.
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.
std::function< isc::data::ConstElementPtr(const std::string &name, const isc::data::ConstElementPtr ¶ms)> CommandHandler
Defines command handler type.