33 #include "BESConfigResponseHandler.h" 34 #include "TheBESKeys.h" 35 #include "BESInfoList.h" 37 #include "BESResponseNames.h" 39 BESConfigResponseHandler::BESConfigResponseHandler(
const string &name )
44 BESConfigResponseHandler::~BESConfigResponseHandler( )
67 BESInfo *info = BESInfoList::TheList()->build_info() ;
70 dhi.action_name = CONFIG_RESPONSE_STR ;
74 map<string,string> props ;
77 for( ; ki != ke; ki++ )
80 props[
"name"] = (*ki).first ;
81 info->begin_tag(
"key", &props ) ;
82 vector<string>::const_iterator v = (*ki).second.begin() ;
83 vector<string>::const_iterator ve = (*ki).second.end() ;
86 info->add_tag(
"value", (*v) ) ;
88 info->end_tag(
"key" ) ;
90 info->end_response() ;
114 info->
transmit( transmitter, dhi ) ;
127 strm << BESIndent::LMarg <<
"BESConfigResponseHandler::dump - (" 128 << (
void *)
this <<
")" << endl ;
129 BESIndent::Indent() ;
131 BESIndent::UnIndent() ;
135 BESConfigResponseHandler::ConfigResponseBuilder(
const string &name )
exception thrown if inernal error encountered
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
handler object that knows how to create a specific response object
informational response object
static TheBESKeys * TheKeys()
response handler that returns the list of keys defined in the BES initialization file.
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
Structure storing information used by the BES to handle the request.
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show keys;' by returning the list of all key/value pairs defined in the BES ini...
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 dump(ostream &strm) const
dumps information about this object