33 #include "BESRequestHandler.h" 53 _handler_list[handler_name] = handler_method;
68 BESRequestHandler::Handler_iter i;
69 i = _handler_list.find(handler_name);
70 if (i != _handler_list.end()) {
71 _handler_list.erase(i);
89 BESRequestHandler::Handler_citer i;
90 i = _handler_list.find(handler_name);
91 if (i != _handler_list.end()) {
107 bool first_name =
true;
108 BESRequestHandler::Handler_citer i = _handler_list.begin();
109 for (; i != _handler_list.end(); i++) {
110 if (!first_name) ret +=
", ";
126 strm << BESIndent::LMarg <<
"BESRequestHandler::dump - (" << (
void *)
this <<
")" << endl;
128 strm << BESIndent::LMarg <<
"name: " << _name << endl;
129 if (_handler_list.size()) {
130 strm << BESIndent::LMarg <<
"registered handler functions:" << endl;
132 BESRequestHandler::Handler_citer i = _handler_list.begin();
133 BESRequestHandler::Handler_citer ie = _handler_list.end();
134 for (; i != ie; i++) {
135 strm << BESIndent::LMarg << (*i).first << endl;
137 BESIndent::UnIndent();
140 strm << BESIndent::LMarg <<
"registered handler functions: none" << endl;
142 BESIndent::UnIndent();
virtual string get_method_names()
return a comma separated list of response object types handled by this request handler
virtual bool add_method(const string &name, p_request_handler_method method)
add a handler method to the request handler that knows how to fill in a specific response object
virtual bool remove_method(const string &name)
remove the specified handler method from this request handler
virtual void dump(ostream &strm) const
dumps information about this object
virtual p_request_handler_method find_method(const string &name)
find the method that can handle the specified response object type