bes
Updated for version 3.20.6
|
33 #include "BESConfigResponseHandler.h"
34 #include "TheBESKeys.h"
35 #include "BESInfoList.h"
37 #include "BESResponseNames.h"
41 BESConfigResponseHandler::BESConfigResponseHandler(
const string &name )
46 BESConfigResponseHandler::~BESConfigResponseHandler( )
69 BESInfo *info = BESInfoList::TheList()->build_info() ;
70 d_response_object = info ;
72 dhi.action_name = CONFIG_RESPONSE_STR ;
76 map<string,string> props ;
79 for( ; ki != ke; ki++ )
82 props[
"name"] = (*ki).first ;
83 info->begin_tag(
"key", &props ) ;
84 vector<string>::const_iterator v = (*ki).second.begin() ;
85 vector<string>::const_iterator ve = (*ki).second.end() ;
88 info->add_tag(
"value", (*v) ) ;
90 info->end_tag(
"key" ) ;
92 info->end_response() ;
111 if( d_response_object )
116 info->
transmit( transmitter, dhi ) ;
129 strm << BESIndent::LMarg <<
"BESConfigResponseHandler::dump - ("
130 << (
void *)
this <<
")" << endl ;
131 BESIndent::Indent() ;
133 BESIndent::UnIndent() ;
137 BESConfigResponseHandler::ConfigResponseBuilder(
const string &name )
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
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
virtual void dump(std::ostream &strm) const
dumps information about this object
informational response object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show keys;' by returning the list of all key/value pairs defined in the BES ini...
static TheBESKeys * TheKeys()
exception thrown if internal error encountered
handler object that knows how to create a specific response object
response handler that returns the list of keys defined in the BES initialization file.
virtual void begin_response(const std::string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
Structure storing information used by the BES to handle the request.