33#ifndef A_BESXMLCommand_h
34#define A_BESXMLCommand_h 1
39#include <libxml/encoding.h>
40#include <libxml/tree.h>
43#include "BESDataHandlerInterface.h"
67 static std::map<std::string, p_xmlcmd_builder> factory;
68 typedef std::map<std::string, p_xmlcmd_builder>::iterator cmd_iter;
126 virtual void dump(std::ostream &strm)
const;
128 static void add_command(
const std::string &cmd_str, p_xmlcmd_builder cmd);
129 static void del_command(
const std::string &cmd_str);
130 static p_xmlcmd_builder
find_command(
const std::string &cmd_str);
Structure storing information used by the BES to handle the request.
top level BES object to house generic methods
Base class for the BES's commands.
virtual void prep_request()
Prepare any information needed to execute the request of this command.
virtual bool has_response()=0
Does this command return a response to the client?
static void del_command(const std::string &cmd_str)
Deletes the command called cmd_str from the list of possible commands.
virtual BESDataHandlerInterface & get_xmlcmd_dhi()
Return the current BESDataHandlerInterface.
BESXMLCommand(const BESDataHandlerInterface &base_dhi)
Creates a BESXMLCommand document given a base data handler interface object.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
virtual void parse_request(xmlNode *node)=0
Parse the XML request document beginning at the given node.
static void add_command(const std::string &cmd_str, p_xmlcmd_builder cmd)
Add a command to the possible commands allowed by this BES.
std::string d_cmd_log_info
Used only for the log.
static p_xmlcmd_builder find_command(const std::string &cmd_str)
Find the BESXMLCommand creation function with the given name.