35#include <libdap/DDS.h>
36#include <libdap/DataDDS.h>
38#include "BESDataResponseHandler.h"
39#include "BESDataDDSResponse.h"
40#include "BESRequestHandlerList.h"
41#include "BESDapNames.h"
42#include "BESDataNames.h"
43#include "BESContextManager.h"
44#include "TheBESKeys.h"
45#include "BESInternalError.h"
47#include "BESTransmitter.h"
49#include "GlobalMetadataStore.h"
55BESDataResponseHandler::BESDataResponseHandler(
const string &name) :
62BESDataResponseHandler::~BESDataResponseHandler()
82 dhi.action_name = DATA_RESPONSE_STR;
114 BESDEBUG(
"dmrpp",
"In BESDataResponseHandler::execute(): Found a DMR++ response for '"
129 int response_size_limit = BESContextManager::TheManager()->get_context_int(
"max_response_size", rsl_found);
133 DDS *dds =
new DDS(NULL,
"virtual");
135 dds->set_response_limit_kb(response_size_limit);
145 d_response_object = bdds;
148 BESRequestHandlerList::TheList()->execute_each(dhi);
164 if (d_response_object) {
165 transmitter->send_response( DATA_SERVICE, d_response_object, dhi);
177 strm << BESIndent::LMarg <<
"BESDataResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
180 BESIndent::UnIndent();
184BESDataResponseHandler::DataResponseBuilder(
const string &name)
void set_container_type(const std::string &type)
set the type of data that this container represents, such as cedar or netcdf.
std::string get_relative_name() const
Get the relative name of the object in this container.
void set_attributes(const std::string &attrs)
set desired attributes for this container
std::string get_dap_client_protocol() const
Return the dap version string sent by the client (e.g., the OLFS)
Represents an OPeNDAP DataDDS DAP2 data object within the BES.
Structure storing information used by the BES to handle the request.
void first_container()
set the container pointer to the first container in the containers list
BESContainer * container
pointer to current container in this interface
response handler that builds an OPeNDAP Data DDS object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'get data for <def_name>' by executing the request for each container in the spe...
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command
virtual void dump(std::ostream &strm) const
dumps information about this object
handler object that knows how to create a specific response object
void dump(std::ostream &strm) const override
dumps information about this object
static TheBESKeys * TheKeys()
Access to the singleton.
static bool read_bool_key(const std::string &key, bool default_value)
Read a boolean-valued key from the bes.conf file.
static std::string read_string_key(const std::string &key, const std::string &default_value)
Read a string-valued key from the bes.conf file.