34 #include "BESHelpResponseHandler.h" 35 #include "BESInfoList.h" 37 #include "BESRequestHandlerList.h" 38 #include "BESRequestHandler.h" 39 #include "BESResponseNames.h" 41 BESHelpResponseHandler::BESHelpResponseHandler(
const string &name )
46 BESHelpResponseHandler::~BESHelpResponseHandler( )
72 BESInfo *info = BESInfoList::TheList()->build_info() ;
76 dhi.action_name = HELP_RESPONSE_STR ;
78 map<string,string> attrs ;
79 attrs[
"name"] = PACKAGE_NAME ;
80 attrs[
"version"] = PACKAGE_VERSION ;
81 info->begin_tag(
"module", &attrs ) ;
83 info->end_tag(
"module" ) ;
86 info->add_break( 2 ) ;
88 BESRequestHandlerList::TheList()->
execute_all( dhi ) ;
90 info->end_response() ;
114 info->
transmit( transmitter, dhi ) ;
127 strm << BESIndent::LMarg <<
"BESHelpResponseHandler::dump - (" 128 << (
void *)
this <<
")" << endl ;
129 BESIndent::Indent() ;
131 BESIndent::UnIndent() ;
135 BESHelpResponseHandler::HelpResponseBuilder(
const string &name )
exception thrown if inernal error encountered
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object.
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
response handler that returns help information about the server and currently loaded modules...
handler object that knows how to create a specific response object
informational response object
virtual void dump(ostream &strm) const
dumps information about this object
virtual void execute_all(BESDataHandlerInterface &dhi)
for all of the registered request handlers, execute the given request
Structure storing information used by the BES to handle the request.
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
virtual void dump(ostream &strm) const
dumps information about this object
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show help;' by returning general help information as well as help information f...