OPeNDAP Hyrax Back End Server (BES) Updated for version 3.8.3
|
Entry point into BES using xml document requests. More...
#include <BESXMLInterface.h>
Public Member Functions | |
BESXMLInterface (const string &cmd, ostream *strm) | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
virtual int | execute_request (const string &from) |
Override execute_request in order to register memory pool. | |
virtual int | finish_with_error (int status) |
virtual | ~BESXMLInterface () |
Static Public Member Functions | |
static void | add_end_callback (p_bes_end end) |
static void | add_init_callback (p_bes_init init) |
Protected Member Functions | |
virtual void | build_data_request_plan () |
Build the data request plan using the BESCmdParser. | |
virtual void | clean () |
Clean up after the request is completed. | |
virtual void | end_request () |
End the BES request. | |
virtual int | exception_manager (BESError &e) |
Manage any exceptions thrown during the whole process. | |
virtual void | execute_data_request_plan () |
Execute the data request plan. | |
virtual int | finish (int status) |
virtual void | initialize () |
Adds the basic DAP XML command objects to the XMLCommand list of possible commands. | |
virtual void | invoke_aggregation () |
Invoke the aggregation server, if there is one. | |
virtual void | log_status () |
Log the status of the request to the BESLog file. | |
virtual void | report_request () |
Report the request and status of the request. | |
virtual void | transmit_data () |
Transmit the response object. | |
virtual void | validate_data_request () |
Validate the incoming request information. | |
Protected Attributes | |
BESDataHandlerInterface * | _dhi |
BESTransmitter * | _transmitter |
Entry point into BES using xml document requests.
Definition at line 52 of file BESXMLInterface.h.
BESXMLInterface::BESXMLInterface | ( | const string & | cmd, |
ostream * | strm | ||
) |
Definition at line 49 of file BESXMLInterface.cc.
References BESInterface::_dhi, BESDataHandlerInterface::data, and DATA_REQUEST.
BESXMLInterface::~BESXMLInterface | ( | ) | [virtual] |
Definition at line 57 of file BESXMLInterface.cc.
References clean().
void BESInterface::add_end_callback | ( | p_bes_end | end | ) | [static, inherited] |
Definition at line 467 of file BESInterface.cc.
void BESInterface::add_init_callback | ( | p_bes_init | init | ) | [static, inherited] |
Definition at line 281 of file BESInterface.cc.
void BESXMLInterface::build_data_request_plan | ( | ) | [protected, virtual] |
Build the data request plan using the BESCmdParser.
Reimplemented from BESBasicInterface.
Definition at line 87 of file BESXMLInterface.cc.
References BESInterface::_dhi, BESDEBUG, BESDataHandlerInterface::data, BESXMLCommand::find_command(), BESReturnManager::find_transmitter(), BESXMLCommand::get_dhi(), BESXMLUtils::GetNodeInfo(), BESXMLCommand::has_response(), BESXMLCommand::parse_request(), REQUEST_FROM, REQUEST_ID, RETURN_CMD, SERVER_PID, BESLog::TheLog(), BESReturnManager::TheManager(), and BESXMLUtils::XMLErrorFunc().
void BESXMLInterface::clean | ( | ) | [protected, virtual] |
Clean up after the request is completed.
Reimplemented from BESBasicInterface.
Definition at line 347 of file BESXMLInterface.cc.
References BESInterface::_dhi, and BESXMLCommand::get_dhi().
Referenced by ~BESXMLInterface().
void BESXMLInterface::dump | ( | ostream & | strm | ) | const [virtual] |
dumps information about this object
Displays the pointer value of this instance
strm | C++ i/o stream to dump the information to |
Definition at line 368 of file BESXMLInterface.cc.
References BESXMLCommand::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
void BESBasicInterface::dump | ( | ostream & | strm | ) | const [virtual, inherited] |
dumps information about this object
Displays the pointer value of this instance
strm | C++ i/o stream to dump the information to |
Reimplemented from BESInterface.
Definition at line 289 of file BESBasicInterface.cc.
References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
void BESInterface::end_request | ( | ) | [protected, virtual, inherited] |
End the BES request.
This method allows developers to add callbacks at the end of a request, to do any cleanup or do any extra work at the end of a request
Definition at line 478 of file BESInterface.cc.
References BESInterface::_dhi, BESDEBUG, BESDataHandlerInterface::container, BESDataHandlerInterface::data, DATA_REQUEST, BESDataHandlerInterface::first_container(), BESDataHandlerInterface::next_container(), and BESContainer::release().
Referenced by BESInterface::finish().
int BESInterface::exception_manager | ( | BESError & | e | ) | [protected, virtual, inherited] |
Manage any exceptions thrown during the whole process.
Specific responses are generated given a specific Exception caught. If additional exceptions are thrown within derived systems then implement those in the derived exception_manager methods. This is a catch-all manager and should be called once derived methods have caught their exceptions.
e | BESError to be managed |
Definition at line 522 of file BESInterface.cc.
References BESInterface::_dhi, BESExceptionManager::handle_exception(), and BESExceptionManager::TheEHM().
Referenced by BESInterface::execute_request(), BESInterface::finish(), and BESInterface::finish_with_error().
void BESXMLInterface::execute_data_request_plan | ( | ) | [protected, virtual] |
Execute the data request plan.
Reimplemented from BESBasicInterface.
Definition at line 257 of file BESXMLInterface.cc.
References BESInterface::_dhi.
int BESXMLInterface::execute_request | ( | const string & | from | ) | [virtual] |
Override execute_request in order to register memory pool.
Once the memory pool is initialized hand over control to parent class to execute the request. Once completed, unregister the memory pool.
This needs to be done here instead of the initialization method because???
Reimplemented from BESBasicInterface.
Definition at line 63 of file BESXMLInterface.cc.
int BESInterface::finish | ( | int | status | ) | [protected, virtual, inherited] |
Definition at line 176 of file BESInterface.cc.
References BESInterface::_dhi, BESInterface::end_request(), BESDataHandlerInterface::error_info, BESInterface::exception_manager(), BESError::get_message(), BESInterface::log_status(), BESInfo::print(), BESInterface::report_request(), BESLog::TheLog(), and BESInterface::transmit_data().
Referenced by BESInterface::execute_request(), and BESInterface::finish_with_error().
int BESInterface::finish_with_error | ( | int | status | ) | [virtual, inherited] |
Definition at line 267 of file BESInterface.cc.
References BESInterface::_dhi, BESDataHandlerInterface::error_info, BESInterface::exception_manager(), and BESInterface::finish().
void BESXMLInterface::initialize | ( | ) | [protected, virtual] |
Adds the basic DAP XML command objects to the XMLCommand list of possible commands.
Initialize the BES.
Once this module is dynamically loaded, this function is called in order to add the DAP request commands to the list of possible commands that this BES can handle
modname | The name of the module being loaded and initialized |
Reimplemented from BESBasicInterface.
Definition at line 54 of file BESXMLDapCommandModule.cc.
References BESXMLCommand::add_command(), BESDEBUG, CATALOG_RESPONSE_STR, BESXMLGetDataDDXCommand::CommandBuilder(), BESXMLCatalogCommand::CommandBuilder(), DATADDX_RESPONSE, and SHOW_INFO_RESPONSE_STR.
void BESXMLInterface::invoke_aggregation | ( | ) | [protected, virtual] |
Invoke the aggregation server, if there is one.
Reimplemented from BESBasicInterface.
Definition at line 272 of file BESXMLInterface.cc.
void BESXMLInterface::log_status | ( | ) | [protected, virtual] |
Log the status of the request to the BESLog file.
Reimplemented from BESBasicInterface.
Definition at line 306 of file BESXMLInterface.cc.
References BESInterface::_dhi.
void BESXMLInterface::report_request | ( | ) | [protected, virtual] |
Report the request and status of the request.
If interested in reporting the request and status of the request then one must register a BESReporter with BESReporterList::TheList().
If no BESReporter objects are registered then nothing happens.
Since there are multiple commands in an XML request document we iterate through the commands and execute report_request for each of the commands, giving the reporter a chance to report on each of the commands.
Reimplemented from BESInterface.
Definition at line 333 of file BESXMLInterface.cc.
References BESInterface::_dhi.
void BESXMLInterface::transmit_data | ( | ) | [protected, virtual] |
Transmit the response object.
Reimplemented from BESBasicInterface.
Definition at line 280 of file BESXMLInterface.cc.
References BESInterface::_dhi, BESInterface::_transmitter, BESDEBUG, BESDataHandlerInterface::data, BESReturnManager::find_transmitter(), RETURN_CMD, and BESReturnManager::TheManager().
void BESXMLInterface::validate_data_request | ( | ) | [protected, virtual] |
Validate the incoming request information.
Reimplemented from BESBasicInterface.
Definition at line 79 of file BESXMLInterface.cc.
BESDataHandlerInterface* BESInterface::_dhi [protected, inherited] |
Definition at line 136 of file BESInterface.h.
Referenced by BESXMLInterface(), build_data_request_plan(), BESBasicInterface::build_data_request_plan(), clean(), BESInterface::clean(), BESBasicInterface::clean(), BESInterface::dump(), BESInterface::end_request(), BESInterface::exception_manager(), execute_data_request_plan(), BESInterface::execute_data_request_plan(), BESBasicInterface::execute_data_request_plan(), BESInterface::execute_request(), BESInterface::finish(), BESInterface::finish_with_error(), BESInterface::initialize(), BESInterface::invoke_aggregation(), BESBasicInterface::invoke_aggregation(), log_status(), BESBasicInterface::log_status(), report_request(), BESInterface::report_request(), transmit_data(), BESInterface::transmit_data(), and BESBasicInterface::transmit_data().
BESTransmitter* BESInterface::_transmitter [protected, inherited] |
Definition at line 137 of file BESInterface.h.
Referenced by BESBasicInterface::build_data_request_plan(), BESInterface::dump(), BESBasicInterface::initialize(), transmit_data(), and BESInterface::transmit_data().