39 #include "BESVersionResponseHandler.h" 40 #include "BESVersionInfo.h" 41 #include "BESRequestHandlerList.h" 42 #include "BESResponseNames.h" 43 #include "TheBESKeys.h" 45 #define DEFAULT_ADMINISTRATOR "support@opendap.org" 47 BESVersionResponseHandler::BESVersionResponseHandler(
const string &name )
52 BESVersionResponseHandler::~BESVersionResponseHandler( )
75 dhi.action_name = VERS_RESPONSE_STR ;
78 string administrator =
"" ;
83 string key =
"BES.ServerAdministrator" ;
88 administrator = DEFAULT_ADMINISTRATOR ;
90 if( administrator.empty() )
92 administrator = DEFAULT_ADMINISTRATOR ;
94 info->add_tag(
"Administrator", administrator ) ;
96 info->add_library( PACKAGE_NAME, PACKAGE_VERSION ) ;
98 BESRequestHandlerList::TheList()->
execute_all( dhi ) ;
100 info->end_response() ;
124 info->
transmit( transmitter, dhi ) ;
137 strm << BESIndent::LMarg <<
"BESVersionResponseHandler::dump - (" 138 << (
void *)
this <<
")" << endl ;
139 BESIndent::Indent() ;
141 BESIndent::UnIndent() ;
145 BESVersionResponseHandler::VersionResponseBuilder(
const string &name )
response handler that returns the version of the BES and the version of any data request handlers reg...
exception thrown if inernal error encountered
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 transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the informational object
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
handler object that knows how to create a specific response object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
virtual void execute_all(BESDataHandlerInterface &dhi)
for all of the registered request handlers, execute the given request
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
Structure storing information used by the BES to handle the request.
virtual void dump(ostream &strm) const
dumps information about this object
virtual void dump(ostream &strm) const
dumps information about this object
static BESKeys * TheKeys()