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( )
67 dhi.action_name = SET_CONTEXT_STR ;
73 string name = dhi.
data[CONTEXT_NAME] ;
76 string e =
"No context name was specified in set context command" ;
80 string value = dhi.
data[CONTEXT_VALUE] ;
82 BESContextManager::TheManager()->
set_context( name, value ) ;
106 info->
transmit( transmitter, dhi ) ;
119 strm << BESIndent::LMarg <<
"BESSetContextResponseHandler::dump - (" 120 << (
void *)
this <<
")" << endl ;
121 BESIndent::Indent() ;
123 BESIndent::UnIndent() ;
127 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