summaryrefslogtreecommitdiffstats
path: root/src/bin/agent/ca_controller.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/agent/ca_controller.cc')
-rw-r--r--src/bin/agent/ca_controller.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/agent/ca_controller.cc b/src/bin/agent/ca_controller.cc
index 475072bf66..38ae98388e 100644
--- a/src/bin/agent/ca_controller.cc
+++ b/src/bin/agent/ca_controller.cc
@@ -8,6 +8,7 @@
#include <agent/ca_controller.h>
#include <agent/ca_process.h>
+#include <agent/ca_command_mgr.h>
#include <agent/parser_context.h>
using namespace isc::process;
@@ -47,6 +48,25 @@ CtrlAgentController::parseFile(const std::string& name) {
return (parser.parseFile(name, ParserContext::PARSER_AGENT));
}
+void
+CtrlAgentController::registerCommands() {
+ CtrlAgentCommandMgr::instance().registerCommand(VERSION_GET_COMMAND,
+ boost::bind(&DControllerBase::versionGetHandler, this, _1, _2));
+
+ CtrlAgentCommandMgr::instance().registerCommand(BUILD_REPORT_COMMAND,
+ boost::bind(&DControllerBase::buildReportHandler, this, _1, _2));
+
+ CtrlAgentCommandMgr::instance().registerCommand(SHUT_DOWN_COMMAND,
+ boost::bind(&DControllerBase::shutdownHandler, this, _1, _2));
+}
+
+void
+CtrlAgentController::deregisterCommands() {
+ CtrlAgentCommandMgr::instance().deregisterCommand(VERSION_GET_COMMAND);
+ CtrlAgentCommandMgr::instance().deregisterCommand(BUILD_REPORT_COMMAND);
+ CtrlAgentCommandMgr::instance().deregisterCommand(SHUT_DOWN_COMMAND);
+}
+
CtrlAgentController::CtrlAgentController()
: DControllerBase(agent_app_name_, agent_bin_name_) {
}