bes
Updated for version 3.20.6
|
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"
51 BESVersionResponseHandler::BESVersionResponseHandler(
const string &name) :
56 BESVersionResponseHandler::~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, PACKAGE_VERSION);
115 if (d_response_object) {
130 strm << BESIndent::LMarg <<
"BESVersionResponseHandler::dump - (" << (
void *)
this <<
")" << std::endl;
133 BESIndent::UnIndent();
137 BESVersionResponseHandler::VersionResponseBuilder(
const string &name)
virtual void begin_response(const std::string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the informational object
virtual void execute_all(BESDataHandlerInterface &dhi)
for all of the registered request handlers, execute the given request
virtual void dump(std::ostream &strm) const
dumps information about this 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...
response handler that returns the version of the BES and the version of any data request handlers reg...
exception thrown if internal error encountered
handler object that knows how to create a specific response object
Structure storing information used by the BES to handle the request.
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object
A ServerAdministrator object from the TheBESKeys associated with the string SERVER_ADMIN_KEY.