OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
Entry point into OPeNDAP using apache modules. More...
#include <BESApacheInterface.h>
Public Member Functions | |
BESApacheInterface (const BESDataRequestInterface &dri) | |
Instantiate a BESApacheInterface object. More... | |
virtual int | execute_request () |
Override execute_request in order to register memory pool. More... | |
virtual | ~BESApacheInterface () |
Protected Member Functions | |
virtual int | exception_manager (BESError &e) |
Handle any exceptions generated from the request. More... | |
virtual void | initialize () |
Initialize the BES object from the apache environment. More... | |
virtual void | validate_data_request () |
Validate the information in the BESDataRequestInterface. More... | |
Entry point into OPeNDAP using apache modules.
The BESApacheInterface class is the entry point for accessing information using OPeNDAP through apache modules.
The format of the request looks somethink like:
get das for sym1,sym2 with sym1.constraint="constraint",sym2.constraint="constraint";
In this example a DAS object response is being requested. The DAS object is to be built from the two symbolic names where each symbolic name has a constraint associated with it. The symbolic names are resoleved to be real files for a given server type. For example, sym1 could resolve to a file accessed through cedar and sym2 could resolve to a file accessed through netcdf.
BESApacheInterface uses BESParser in order to build the list of containers (symbolic containers resolving to real file and server type). Because the request is being made from a browser, a BESBasicHttpTransmitter object is used to transmit the response object back to the requesting browser.
Definition at line 75 of file BESApacheInterface.h.
BESApacheInterface::BESApacheInterface | ( | const BESDataRequestInterface & | dri) |
Instantiate a BESApacheInterface object.
dri | BESDataRequestInterface built using information from the apache module including the request and constraint passed as part of the URL. |
Definition at line 63 of file BESApacheInterface.cc.
|
virtual |
Definition at line 69 of file BESApacheInterface.cc.
|
protectedvirtual |
Handle any exceptions generated from the request.
Captures if there is an error in the request format and builds a web page to allow the user to buid a request. If the request did not come from IE or Netscape then generate an error to the user. If the request contains a bad format, but a request is made, then generate an error message. Otherwise, if the request is empty, then generate a FORM to allow the user to enter a request string.
All other exceptions are passed off to the parent exception manager to handle.
e | BESError to be handled. If this method does not handle the exception then it is passed to the parent class exception_manager method to be handled. |
Definition at line 270 of file BESApacheInterface.cc.
References BES_INTERNAL_ERROR, BESError::get_error_type(), BESError::get_message(), INCORRECT_REQUEST, and INCORRECT_REQUEST_MSG.
|
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???
Definition at line 85 of file BESApacheInterface.cc.
References BES_INTERNAL_FATAL_ERROR, BESMemoryManager::register_global_pool(), and BESMemoryManager::unregister_global_pool().
Referenced by BESApacheWrapper::call_BES().
|
protectedvirtual |
Initialize the BES object from the apache environment.
First calls the parent initialization method in order to initialize all global variables.
Once this is completed the BESDataHandlerInterface is initialized given the BESDataRequestInterface constructed within the module code.
This includes retreiving the user information from the cookie created on the client side in the browser. The cookie name is defined in OPENDAP_USER_COOKIE above.
Also creates the BESBasicHttpTransmitter object in order to transmit the response object via http, setting the mime type and other header information for the response.
Definition at line 148 of file BESApacheInterface.cc.
References BESDEBUG, _BESDataRequestInterface::cookie, DATA_REQUEST, find_user_from_cookie(), BESMemoryManager::initialize_memory_pool(), _BESDataRequestInterface::request, _BESDataRequestInterface::script_name, _BESDataRequestInterface::server_address, _BESDataRequestInterface::server_name, _BESDataRequestInterface::server_port, _BESDataRequestInterface::server_protocol, BESLog::TheLog(), _BESDataRequestInterface::token, USER_ADDRESS, _BESDataRequestInterface::user_address, _BESDataRequestInterface::user_agent, USER_NAME, and USER_TOKEN.
|
protectedvirtual |
Validate the information in the BESDataRequestInterface.
Definition at line 200 of file BESApacheInterface.cc.
References INCORRECT_REQUEST, INCORRECT_REQUEST_MSG, _BESDataRequestInterface::request, _BESDataRequestInterface::script_name, _BESDataRequestInterface::server_address, _BESDataRequestInterface::server_name, _BESDataRequestInterface::server_port, _BESDataRequestInterface::server_protocol, BESError::set_error_type(), _BESDataRequestInterface::user_address, and _BESDataRequestInterface::user_agent.