36 #include "BESRequestHandler.h"
37 #include "BESNotFoundError.h"
61 _handler_list[handler_name] = handler_method;
76 BESRequestHandler::Handler_iter i;
77 i = _handler_list.find(handler_name);
78 if (i != _handler_list.end()) {
79 _handler_list.erase(i);
97 BESRequestHandler::Handler_citer i;
98 i = _handler_list.find(handler_name);
99 if (i != _handler_list.end()) {
115 bool first_name =
true;
116 BESRequestHandler::Handler_citer i = _handler_list.begin();
117 for (; i != _handler_list.end(); i++) {
118 if (!first_name) ret +=
", ";
141 if (stat(name.c_str(), &statbuf) == -1){
146 return statbuf.st_mtime;
153 throw BESNotFoundError(
"Cannot find the add_attributes() in the specific handler.", __FILE__, __LINE__);
165 strm << BESIndent::LMarg <<
"BESRequestHandler::dump - (" << (
void *)
this <<
")" << endl;
167 strm << BESIndent::LMarg <<
"name: " << _name << endl;
168 if (_handler_list.size()) {
169 strm << BESIndent::LMarg <<
"registered handler functions:" << endl;
171 BESRequestHandler::Handler_citer i = _handler_list.begin();
172 BESRequestHandler::Handler_citer ie = _handler_list.end();
173 for (; i != ie; i++) {
174 strm << BESIndent::LMarg << (*i).first << endl;
176 BESIndent::UnIndent();
179 strm << BESIndent::LMarg <<
"registered handler functions: none" << endl;
181 BESIndent::UnIndent();