42#include "BESVersionResponseHandler.h"
43#include "BESVersionInfo.h"
44#include "BESRequestHandlerList.h"
45#include "BESResponseNames.h"
46#include "ServerAdministrator.h"
47#include "TheBESKeys.h"
49#define DEFAULT_ADMINISTRATOR "support@opendap.org"
51BESVersionResponseHandler::BESVersionResponseHandler(
const string &name) :
56BESVersionResponseHandler::~BESVersionResponseHandler()
77 d_response_object = info;
78 dhi.action_name = VERS_RESPONSE_STR;
81 string admin_email =
"";
84 admin_email = sd.get_email();
87 admin_email = DEFAULT_ADMINISTRATOR;
89 if (admin_email.empty()) {
90 admin_email = DEFAULT_ADMINISTRATOR;
92 info->add_tag(
"Administrator", admin_email);
94 info->add_library( PACKAGE_NAME, CVER);
96 BESRequestHandlerList::TheList()->execute_all(dhi);
115 if (d_response_object) {
130 strm << BESIndent::LMarg <<
"BESVersionResponseHandler::dump - (" << (
void *)
this <<
")" << std::endl;
133 BESIndent::UnIndent();
137BESVersionResponseHandler::VersionResponseBuilder(
const string &name)
Structure storing information used by the BES to handle the request.
exception thrown if internal error encountered
handler object that knows how to create a specific response object
void dump(std::ostream &strm) const override
dumps information about this object
void begin_response(const std::string &response_name, BESDataHandlerInterface &dhi) override
begin the informational response
void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi) override
transmit the informational object
response handler that returns the version of the BES and the version of any data request handlers reg...
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show version;' by returning the version of the BES and the version of all regis...
A ServerAdministrator object from the TheBESKeys associated with the string SERVER_ADMIN_KEY.