bes  Updated for version 3.20.6
BESResponseHandler Class Referenceabstract

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

#include <BESResponseHandler.h>

Collaboration diagram for BESResponseHandler:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const
 dumps information about this object More...
 
virtual void execute (BESDataHandlerInterface &dhi)=0
 knows how to build a requested response object More...
 
virtual BESResponseObjectget_response_object ()
 return the current response object More...
 
virtual BESResponseObjectset_response_object (BESResponseObject *o)
 replaces the current response object with the specified one, returning the current response object More...
 
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
 transmit the response object built by the execute command using the specified transmitter object More...
 

Protected Member Functions

 BESResponseHandler (const std::string &name)
 

Protected Attributes

std::string d_annotation_service_url
 
std::string d_response_name
 
BESResponseObjectd_response_object
 

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.

Member Function Documentation

◆ dump()

◆ 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 BESStreamResponseHandler, BESDefineResponseHandler, BESDataResponseHandler, SiteMapResponseHandler, BESSetContainerResponseHandler, ShowPathInfoResponseHandler, BESDap4ResponseHandler, bes::ShowNodeResponseHandler, BESDDSResponseHandler, BESDelDefResponseHandler, BESDelDefsResponseHandler, GatewayPathInfoResponseHandler, BESDataDDXResponseHandler, BESDDXResponseHandler, BESDelContainersResponseHandler, BESHelpResponseHandler, BESSetContextResponseHandler, BESShowContainersResponseHandler, BESDelContainerResponseHandler, BESShowContextResponseHandler, BESVersionResponseHandler, BESDASResponseHandler, BESDMRResponseHandler, BESConfigResponseHandler, BESShowDefsResponseHandler, BESShowErrorResponseHandler, BESStatusResponseHandler, W10nShowPathInfoResponseHandler, BESProcIdResponseHandler, BESServicesResponseHandler, BESUsageResponseHandler, BESWWWResponseHandler, BESCatalogResponseHandler, bes::SetContextsResponseHandler, ShowBesKeyResponseHandler, BESXDResponseHandler, SampleSayResponseHandler, and bes::NullResponseHandler.

◆ 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 82 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 88 of file BESResponseHandler.cc.

◆ transmit()

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

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