33 #include "BESSetContextResponseHandler.h" 34 #include "BESSilentInfo.h" 35 #include "BESContextManager.h" 36 #include "BESDataNames.h" 37 #include "BESSyntaxUserError.h" 38 #include "BESResponseNames.h" 40 BESSetContextResponseHandler::BESSetContextResponseHandler(
const string &name) :
45 BESSetContextResponseHandler::~BESSetContextResponseHandler()
66 dhi.action_name = SET_CONTEXT_STR;
72 string name = dhi.
data[CONTEXT_NAME];
74 string e =
"No context name was specified in set context command";
78 string value = dhi.
data[CONTEXT_VALUE];
80 BESContextManager::TheManager()->
set_context(name, value);
112 strm << BESIndent::LMarg <<
"BESSetContextResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
115 BESIndent::UnIndent();
119 BESSetContextResponseHandler::SetContextResponseBuilder(
const string &name)
silent informational response object
virtual void set_context(const string &name, const string &value)
set context in the BES
exception thrown if inernal error encountered
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
error thrown if there is a user syntax error in the request or any other user error ...
handler object that knows how to create a specific response object
informational response object
virtual void dump(ostream &strm) const
dumps information about this object
response handler that set context within the BES as a simple name/value pair
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.
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 execute(BESDataHandlerInterface &dhi)
executes the command to set context within the BES