35#include "BESInfoList.h"
38#include "SampleSayResponseHandler.h"
39#include "SampleResponseNames.h"
45SampleSayResponseHandler::SampleSayResponseHandler(
const string &name) :
50SampleSayResponseHandler::~SampleSayResponseHandler()
58 BESInfo *info = BESInfoList::TheList()->build_info();
59 d_response_object = info;
63 string str = dhi.
data[SAY_WHAT] +
" " + dhi.
data[SAY_TO];
64 info->add_tag(
"text", str);
73 if (d_response_object) {
77 throw BESInternalError(
"Could not cast the BESResponse object to an Info object.", __FILE__, __LINE__);
84 strm << BESIndent::LMarg <<
"SampleSayResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
87 BESIndent::UnIndent();
91SampleSayResponseHandler::SampleSayResponseBuilder(
const string &name)
Structure storing information used by the BES to handle the request.
std::map< std::string, std::string > data
the map of string data that will be required for the current request.
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
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
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void execute(BESDataHandlerInterface &dhi)
knows how to build a requested response object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object