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

handler object that knows how to create a specific response object More...

#include <BESResponseHandler.h>

Inheritance diagram for BESResponseHandler:
Inheritance graph
Collaboration diagram for BESResponseHandler:
Collaboration graph

Public Member Functions

 BESResponseHandler (std::string name)
 
void dump (std::ostream &strm) const override
 dumps information about this object
 
virtual void execute (BESDataHandlerInterface &dhi)=0
 knows how to build a requested response object
 
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
 
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
 transmit the response object built by the execute command using the specified transmitter object
 

Protected Attributes

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

Friends

class resplistT
 

Detailed Description

handler object that knows how to create a specific response object

A response handler is something that knows how to create a response object, such as a DAS, DDS, DDX, informational response object. It knows how to construct the requested response object but does not necessarily fill in the response object. It does know, however, how to have other objects fill in the response object. For example, a BESDASResponseHandler knows that it needs to go to each of the request handlers (data handlers) for each of the containers requested so that those request handlers can fill in the response object. Another example is the BESHelpResponseHandler, which knows to construct an informational response object and then pass that informational response object to each registered request handler (data handler) so that each of the request handlers has an opportunity to add any help information it needs to add.

Response handlers such as the BESStatusResponseHandler (and others) are able to create the informational response object and fill it in without handing off the response object to any other object. But usually, the response handler passes the response object to another object to have it fill in the response object.

A response handler object also knows how to transmit the response object using a BESTransmitter object.

This is an abstract base class for response handlers. Derived classes implement the methods execute and transmit.

See also
BESResponseObject
BESContainer
BESRequestHandler
BESResponseHandlerList
BESTransmitter

Definition at line 77 of file BESResponseHandler.h.

Constructor & Destructor Documentation

◆ BESResponseHandler()

BESResponseHandler::BESResponseHandler ( std::string name)
explicit

Definition at line 50 of file BESResponseHandler.cc.

◆ ~BESResponseHandler()

BESResponseHandler::~BESResponseHandler ( )
override

Definition at line 55 of file BESResponseHandler.cc.

Member Function Documentation

◆ dump()

void BESResponseHandler::dump ( std::ostream & strm) const
overridevirtual

◆ execute()

virtual void BESResponseHandler::execute ( BESDataHandlerInterface & dhi)
pure virtual

knows how to build a requested response object

Derived instances of this abstract base class know how to create a specific response object and what objects (including itself) to pass that response object to for it to be filled in.

Parameters
dhistructure that holds request and response information
Exceptions
BESHandlerExceptionif there is a problem building the response object
BESResponseExceptionupon fatal error building the response object
See also
BESDataHandlerInterface
BESResponseObject

Implemented in bes::NullResponseHandler, bes::SetContextsResponseHandler, bes::ShowNodeResponseHandler, BESCatalogResponseHandler, BESConfigResponseHandler, BESDap4ResponseHandler, BESDASResponseHandler, BESDataDDXResponseHandler, BESDataResponseHandler, BESDDSResponseHandler, BESDDXResponseHandler, BESDefineResponseHandler, BESDelContainerResponseHandler, BESDelContainersResponseHandler, BESDelDefResponseHandler, BESDelDefsResponseHandler, BESDMRResponseHandler, BESHelpResponseHandler, BESProcIdResponseHandler, BESServicesResponseHandler, BESSetContainerResponseHandler, BESSetContextResponseHandler, BESShowContainersResponseHandler, BESShowContextResponseHandler, BESShowDefsResponseHandler, BESShowErrorResponseHandler, BESStatusResponseHandler, BESStreamResponseHandler, BESUsageResponseHandler, BESVersionResponseHandler, BESWWWResponseHandler, BESXDResponseHandler, GatewayPathInfoResponseHandler, ncml_module::NCMLCacheAggResponseHandler, SampleSayResponseHandler, ShowBesKeyResponseHandler, ShowPathInfoResponseHandler, SiteMapResponseHandler, and W10nShowPathInfoResponseHandler.

◆ get_response_object()

BESResponseObject * BESResponseHandler::get_response_object ( )
virtual

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)
virtual

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.

◆ transmit()

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

Friends And Related Symbol Documentation

◆ resplistT

friend class resplistT
friend

Definition at line 84 of file BESResponseHandler.h.

Member Data Documentation

◆ d_annotation_service_url

std::string BESResponseHandler::d_annotation_service_url
protected

Definition at line 82 of file BESResponseHandler.h.

◆ d_response_name

std::string BESResponseHandler::d_response_name
protected

Definition at line 79 of file BESResponseHandler.h.

◆ d_response_object

BESResponseObject* BESResponseHandler::d_response_object = nullptr
protected

Definition at line 80 of file BESResponseHandler.h.


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