34#include "BESHelpResponseHandler.h"
35#include "BESInfoList.h"
37#include "BESRequestHandlerList.h"
38#include "BESRequestHandler.h"
39#include "BESResponseNames.h"
46BESHelpResponseHandler::BESHelpResponseHandler(
const string &name )
51BESHelpResponseHandler::~BESHelpResponseHandler( )
77 BESInfo *info = BESInfoList::TheList()->build_info() ;
78 d_response_object = info ;
81 dhi.action_name = HELP_RESPONSE_STR ;
83 map<string, string, std::less<>> attrs ;
84 attrs[
"name"] = PACKAGE_NAME ;
85 attrs[
"version"] = PACKAGE_VERSION ;
86 info->begin_tag(
"module", &attrs ) ;
88 info->end_tag(
"module" ) ;
91 info->add_break( 2 ) ;
93 BESRequestHandlerList::TheList()->execute_all( dhi ) ;
95 info->end_response() ;
114 if( d_response_object )
119 info->
transmit( transmitter, dhi ) ;
132 strm << BESIndent::LMarg <<
"BESHelpResponseHandler::dump - ("
133 << (
void *)
this <<
")" << endl ;
134 BESIndent::Indent() ;
136 BESIndent::UnIndent() ;
140BESHelpResponseHandler::HelpResponseBuilder(
const string &name )
Structure storing information used by the BES to handle the request.
response handler that returns help information about the server and currently loaded modules.
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show help;' by returning general help information as well as help information f...
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object
virtual void dump(std::ostream &strm) const
dumps information about this object
informational response object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
virtual void begin_response(const std::string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void add_data_from_file(const std::string &key, const std::string &name)
add data from a file to the informational object.
exception thrown if internal error encountered
handler object that knows how to create a specific response object
void dump(std::ostream &strm) const override
dumps information about this object