29 #include <InternalErr.h> 31 #include <BESResponseHandler.h> 32 #include <BESResponseNames.h> 33 #include <BESVersionInfo.h> 34 #include <BESTextInfo.h> 35 #include "BESDapNames.h" 36 #include "BESDataDDSResponse.h" 37 #include "BESDDSResponse.h" 38 #include "BESDASResponse.h" 39 #include <BESConstraintFuncs.h> 40 #include <BESServiceRegistry.h> 43 #include "GatewayRequestHandler.h" 44 #include "GatewayResponseNames.h" 47 using namespace gateway;
49 GatewayRequestHandler::GatewayRequestHandler(
const string &name) :
52 add_method(VERS_RESPONSE, GatewayRequestHandler::gateway_build_vers);
53 add_method(HELP_RESPONSE, GatewayRequestHandler::gateway_build_help);
56 GatewayRequestHandler::~GatewayRequestHandler()
64 if (!info)
throw InternalErr(__FILE__, __LINE__,
"Expected a BESVersionInfo instance");
66 info->add_module(PACKAGE_NAME, PACKAGE_VERSION);
68 info->add_module(MODULE_NAME, MODULE_VERSION);
76 if (!info)
throw InternalErr(__FILE__, __LINE__,
"Expected a BESInfo instance");
80 map<string, string> attrs;
81 attrs[
"name"] = MODULE_NAME;
82 attrs[
"version"] = MODULE_VERSION;
84 attrs[
"name"] = PACKAGE_NAME;
85 attrs[
"version"] = PACKAGE_VERSION;
87 list<string> services;
89 if (services.size() > 0) {
91 attrs[
"handles"] = handles;
93 info->begin_tag(
"module", &attrs);
95 info->end_tag(
"module");
102 strm << BESIndent::LMarg <<
"GatewayRequestHandler::dump - (" << (
void *)
this <<
")" << endl;
105 BESIndent::UnIndent();
informational response object
static string implode(const list< string > &values, char delim)
virtual BESResponseObject * get_response_object()
return the current response object
Represents a specific data type request handler.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void dump(ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
virtual void services_handled(const string &handler, list< string > &services)
returns the list of servies provided by the handler in question