bes
Updated for version 3.20.5
|
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();
55 d_response_object = info;
59 string str = dhi.
data[SAY_WHAT] +
" " + dhi.
data[SAY_TO];
60 info->add_tag(
"text", str);
69 if (d_response_object) {
70 BESInfo *info = dynamic_cast<BESInfo *>(d_response_object);
73 throw BESInternalError(
"Could not cast the BESResponse object to an Info object.", __FILE__, __LINE__);
80 strm << BESIndent::LMarg <<
"SampleSayResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
83 BESIndent::UnIndent();
87 SampleSayResponseHandler::SampleSayResponseBuilder(
const string &name)
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
informational response object
exception thrown if inernal error encountered
handler object that knows how to create a specific response object
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
map< string, string > data
the map of string data that will be required for the current request.
Structure storing information used by the BES to handle the request.
virtual void execute(BESDataHandlerInterface &dhi)
knows how to build a requested response object