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

A ResponseHandler that does nothing. More...

#include <NullResponseHandler.h>

Inheritance diagram for bes::NullResponseHandler:
Inheritance graph
Collaboration diagram for bes::NullResponseHandler:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const
 dumps information about this object
 
virtual void execute (BESDataHandlerInterface &)
 Minimal execution.
 
virtual BESResponseObjectget_response_object ()
 return the current response object
 
 NullResponseHandler (const std::string &name)
 
virtual BESResponseObjectset_response_object (BESResponseObject *o)
 replaces the current response object with the specified one, returning the current response object
 
virtual void transmit (BESTransmitter *, BESDataHandlerInterface &)
 This is a no-op.
 

Static Public Member Functions

static BESResponseHandlerNullResponseBuilder (const std::string &name)
 

Protected Attributes

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

Detailed Description

A ResponseHandler that does nothing.

Many commands don't send a response back to the BES's client. Instead they modify the BES's current state. This ResponseHandler is useful when the entire command's action (like setContexts) can be performed during the XMLInterface::build_data_request_plan() phase of command evaluation. This ResponseHandler will do only bookkeeping during its execute() method and nothing at all during transmit().

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

See also
BESResponseObject

Definition at line 46 of file NullResponseHandler.h.

Constructor & Destructor Documentation

◆ NullResponseHandler()

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

Definition at line 49 of file NullResponseHandler.h.

◆ ~NullResponseHandler()

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

Definition at line 50 of file NullResponseHandler.h.

Member Function Documentation

◆ dump()

virtual void bes::NullResponseHandler::dump ( std::ostream & strm) const
inlinevirtual

dumps information about this object

Displays the pointer value of this instance along with the name of this response handler and, if present, dumps the response object itself.

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

Reimplemented from BESResponseHandler.

Definition at line 76 of file NullResponseHandler.h.

◆ execute()

virtual void bes::NullResponseHandler::execute ( BESDataHandlerInterface & )
inlinevirtual

Minimal execution.

Set the ResponseObject for this ResponseHandler to null.

Parameters
dhistructure that holds request and response information
Exceptions
BESSyntaxUserErrorif no context name was given object

Implements BESResponseHandler.

Definition at line 59 of file NullResponseHandler.h.

◆ 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.

◆ NullResponseBuilder()

static BESResponseHandler * bes::NullResponseHandler::NullResponseBuilder ( const std::string & name)
inlinestatic

Definition at line 86 of file NullResponseHandler.h.

◆ 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.

◆ transmit()

virtual void bes::NullResponseHandler::transmit ( BESTransmitter * ,
BESDataHandlerInterface &  )
inlinevirtual

This is a no-op.

The NullResponseHandler does not transmit a response. Errors are returned using the DHI's error object field and are returned to the BES's client with ExceptionHandler.

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

Implements BESResponseHandler.

Definition at line 74 of file NullResponseHandler.h.

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 file: