35 #include "BESInfoList.h" 38 #include "SampleSayResponseHandler.h" 39 #include "SampleResponseNames.h" 41 SampleSayResponseHandler::SampleSayResponseHandler(
const string &name) :
46 SampleSayResponseHandler::~SampleSayResponseHandler()
54 BESInfo *info = BESInfoList::TheList()->build_info();
59 string str = dhi.
data[SAY_WHAT] +
" " + dhi.
data[SAY_TO];
60 info->add_tag(
"text", str);
72 throw BESInternalError(
"Could not cast the BESResponse object to an Info object.", __FILE__, __LINE__);
79 strm << BESIndent::LMarg <<
"SampleSayResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
82 BESIndent::UnIndent();
86 SampleSayResponseHandler::SampleSayResponseBuilder(
const string &name)
virtual void execute(BESDataHandlerInterface &dhi)
knows how to build a requested response object
exception thrown if inernal error encountered
virtual void dump(ostream &strm) const
dumps information about this object
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
Structure storing information used by the BES to handle the request.
map< string, string > data
the map of string data that will be required for the current request.
virtual void dump(ostream &strm) const
dumps information about this object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response