33 #include "BESXMLCommand.h" 34 #include "BESResponseHandlerList.h" 35 #include "BESSyntaxUserError.h" 36 #include "BESDataNames.h" 39 map<string, p_xmlcmd_builder> BESXMLCommand::cmd_list;
59 if (!_dhi.response_handler) {
68 _dhi.
data[DATA_REQUEST] = _str_cmd;
70 *(BESLog::TheLog()) << _dhi.
data[SERVER_PID] <<
" from " << _dhi.
data[REQUEST_FROM] <<
" [" << _str_cmd
71 <<
"] received" << endl;
86 BESXMLCommand::cmd_list[cmd_str] = cmd;
98 BESXMLCommand::cmd_iter iter = BESXMLCommand::cmd_list.find(cmd_str);
99 if (iter != BESXMLCommand::cmd_list.end()) {
100 BESXMLCommand::cmd_list.erase(iter);
111 return BESXMLCommand::cmd_list[cmd_str];
122 strm << BESIndent::LMarg <<
"BESXMLCommand::dump - (" << (
void *)
this <<
")" << endl;
124 BESIndent::UnIndent();
BESXMLCommand(const BESDataHandlerInterface &base_dhi)
Creates a BESXMLCommand document given a base data handler interface object.
virtual BESResponseHandler * find_handler(const string &handler)
returns the response handler with the given name from the list
static bool del_command(const string &cmd_str)
Deletes the command called cmd_str from the list of possible commands.
static void add_command(const string &cmd_str, p_xmlcmd_builder cmd)
Add a command to the possible commands allowed by this BES.
error thrown if there is a user syntax error in the request or any other user error ...
void make_copy(const BESDataHandlerInterface ©_from)
deprecated
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
Structure storing information used by the BES to handle the request.
map< string, string > data
the map of string data that will be required for the current request.
string action
the response object requested, e.g. das, dds
virtual void dump(ostream &strm) const
dumps information about this object
static p_xmlcmd_builder find_command(const string &cmd_str)
Find the BESXMLCommand creation function with the given name.