bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
bes::SetContextsResponseHandler Class Reference

Set a number of context name-value pairs at once. More...

#include <SetContextsResponseHandler.h>

Inheritance diagram for bes::SetContextsResponseHandler:
Inheritance graph
Collaboration diagram for bes::SetContextsResponseHandler:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const
 dumps information about this object
 
virtual void execute (BESDataHandlerInterface &dhi)
 Set multiple contexts in the BES's Context Manager.
 
virtual BESResponseObjectget_response_object ()
 return the current response object
 
virtual BESResponseObjectset_response_object (BESResponseObject *o)
 replaces the current response object with the specified one, returning the current response object
 
 SetContextsResponseHandler (const std::string &name)
 
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
 For the setContexts command, this is a no-op.
 

Static Public Member Functions

static BESResponseHandlerSetContextsResponseBuilder (const std::string &name)
 

Protected Attributes

std::string d_annotation_service_url
 
std::string d_response_name
 
BESResponseObjectd_response_object = nullptr
 

Detailed Description

Set a number of context name-value pairs at once.

Given that the XMLSetContextsCommand <setContexts> was found, perform that action. A number of BES context name-value pairs are encoded in the DHI.data[] map (a simple associative array that maps one string value to another). Read those name-value pairs and add them to the BES's Context data store.

This ResponseHandler instance will not transmit anything back to the BES's client unless there is an error.

Note
The XMLSetContextsCommand can be built to use the NullResponseHandler instead.
See also
BESResponseObject

Definition at line 47 of file SetContextsResponseHandler.h.

Constructor & Destructor Documentation

◆ SetContextsResponseHandler()

bes::SetContextsResponseHandler::SetContextsResponseHandler ( const std::string & name)
inline

Definition at line 50 of file SetContextsResponseHandler.h.

◆ ~SetContextsResponseHandler()

virtual bes::SetContextsResponseHandler::~SetContextsResponseHandler ( void )
inlinevirtual

Definition at line 51 of file SetContextsResponseHandler.h.

Member Function Documentation

◆ dump()

void SetContextsResponseHandler::dump ( std::ostream & strm) const
virtual

dumps information about this object

Displays the pointer value of this instance

Parameters
strmC++ i/o stream to dump the information to

Reimplemented from BESResponseHandler.

Definition at line 109 of file SetContextsResponseHandler.cc.

◆ execute()

void SetContextsResponseHandler::execute ( BESDataHandlerInterface & dhi)
virtual

Set multiple contexts in the BES's Context Manager.

Parameters
dhistructure that holds request and response information
Exceptions
BESSyntaxUserErrorif no context name was given object
See also
BESDataHandlerInterface
BESInfo
BESContextManager

Implements BESResponseHandler.

Definition at line 53 of file SetContextsResponseHandler.cc.

◆ get_response_object()

BESResponseObject * BESResponseHandler::get_response_object ( )
virtualinherited

return the current response object

Returns the current response object, null if one has not yet been created. The response handler maintains ownership of the response object.

Returns
current response object
See also
BESResponseObject

Definition at line 62 of file BESResponseHandler.cc.

◆ set_response_object()

BESResponseObject * BESResponseHandler::set_response_object ( BESResponseObject * o)
virtualinherited

replaces the current response object with the specified one, returning the current response object

This method is used to replace the response object with a new one, for example if during aggregation a new response object is built from the current response object.

The caller of set_response_object now owns the returned response object. The new response object is now owned by the response object.

Parameters
onew response object used to replace the current one
Returns
the response object being replaced
See also
BESResponseObject

Definition at line 68 of file BESResponseHandler.cc.

◆ SetContextsResponseBuilder()

BESResponseHandler * SetContextsResponseHandler::SetContextsResponseBuilder ( const std::string & name)
static

Definition at line 118 of file SetContextsResponseHandler.cc.

◆ transmit()

void SetContextsResponseHandler::transmit ( BESTransmitter * transmitter,
BESDataHandlerInterface & dhi )
virtual

For the setContexts command, this is a no-op.

Parameters
transmitterobject that knows how to transmit specific basic types
dhistructure that holds the request and response information

Implements BESResponseHandler.

Definition at line 99 of file SetContextsResponseHandler.cc.

Member Data Documentation

◆ d_annotation_service_url

std::string BESResponseHandler::d_annotation_service_url
protectedinherited

Definition at line 82 of file BESResponseHandler.h.

◆ d_response_name

std::string BESResponseHandler::d_response_name
protectedinherited

Definition at line 79 of file BESResponseHandler.h.

◆ d_response_object

BESResponseObject* BESResponseHandler::d_response_object = nullptr
protectedinherited

Definition at line 80 of file BESResponseHandler.h.


The documentation for this class was generated from the following files: