bes
Updated for version 3.20.5
|
39 #include "BESVersionResponseHandler.h"
40 #include "BESVersionInfo.h"
41 #include "BESRequestHandlerList.h"
42 #include "BESResponseNames.h"
43 #include "ServerAdministrator.h"
44 #include "TheBESKeys.h"
46 #define DEFAULT_ADMINISTRATOR "support@opendap.org"
48 BESVersionResponseHandler::BESVersionResponseHandler(
const string &name) :
53 BESVersionResponseHandler::~BESVersionResponseHandler()
74 d_response_object = info;
75 dhi.action_name = VERS_RESPONSE_STR;
78 string admin_email =
"";
81 admin_email = sd.get_email();
84 admin_email = DEFAULT_ADMINISTRATOR;
86 if (admin_email.empty()) {
87 admin_email = DEFAULT_ADMINISTRATOR;
89 info->add_tag(
"Administrator", admin_email);
91 info->add_library( PACKAGE_NAME, PACKAGE_VERSION);
112 if (d_response_object) {
113 BESVersionInfo *info = dynamic_cast<BESVersionInfo *>(d_response_object);
127 strm << BESIndent::LMarg <<
"BESVersionResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
130 BESIndent::UnIndent();
134 BESVersionResponseHandler::VersionResponseBuilder(
const string &name)
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 execute(BESDataHandlerInterface &dhi)
executes the command 'show version;' by returning the version of the BES and the version of all regis...
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
response handler that returns the version of the BES and the version of any data request handlers reg...
exception thrown if inernal 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.
virtual void dump(ostream &strm) const
dumps information about this object