bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
BESRequestHandlerList Class Reference

The list of registered request handlers for this server; a singleton. More...

#include <BESRequestHandlerList.h>

Inheritance diagram for BESRequestHandlerList:
Inheritance graph
Collaboration diagram for BESRequestHandlerList:
Collaboration graph

Public Types

typedef std::map< std::string, BESRequestHandler * >::const_iterator Handler_citer
 
typedef std::map< std::string, BESRequestHandler * >::iterator Handler_iter
 

Public Member Functions

virtual bool add_handler (const std::string &handler_name, BESRequestHandler *handler)
 
virtual void dump (std::ostream &strm) const
 dump the contents of this object to the specified ostream
 
virtual void execute_all (BESDataHandlerInterface &dhi)
 
virtual void execute_current (BESDataHandlerInterface &dhi)
 
virtual void execute_each (BESDataHandlerInterface &dhi)
 
virtual BESRequestHandlerfind_handler (const std::string &handler_name)
 
virtual Handler_citer get_first_handler ()
 
virtual std::string get_handler_names ()
 
virtual Handler_citer get_last_handler ()
 
virtual BESRequestHandlerremove_handler (const std::string &handler_name)
 

Static Public Member Functions

static BESRequestHandlerListTheList ()
 

Detailed Description

The list of registered request handlers for this server; a singleton.

For a type of data to be read by the BES, there must be a request handler that can read those data. Typically, a request handler reads information from files stored on the computer running the BES, although it is possible for a request handler to read data from remote machines, other data services, relational databases, et cetera.

Instances of BESRequestHandler use the BESDataHandlerInterface object to get a ResponseObject that they then 'fill in' with the 'requested' information. The ResponseObject holds instances of other objects like DAS, DDS, DMR, or version.

The request handlers are registered with this request handler list using a short std::string as the key value. Other parts of the BES can access this singleton class to find a specific handler using that std::string.

See also
BESDapModule::initialize() to see where various handlers used to process requests for DAP2 and DAP4 responses are registered along with the std::strings that can be used to access the handlers using this class' file_handler() method.

Definition at line 66 of file BESRequestHandlerList.h.

Member Typedef Documentation

◆ Handler_citer

typedef std::map<std::string,BESRequestHandler*>::const_iterator BESRequestHandlerList::Handler_citer

Definition at line 80 of file BESRequestHandlerList.h.

◆ Handler_iter

typedef std::map<std::string,BESRequestHandler*>::iterator BESRequestHandlerList::Handler_iter

Definition at line 81 of file BESRequestHandlerList.h.

Member Function Documentation

◆ dump()

virtual void BESRequestHandlerList::dump ( std::ostream & strm) const
virtual

dump the contents of this object to the specified ostream

This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...

The inline function below can be used to dump the contents of an OPeNDAPObj object. For example, the object Animal is derived from BESObj. A user could do the following:

Animal *a = new dog( "Sparky" ) ; cout << a << endl ;

And the dump method for dog could display the name passed into the constructor, the (this) pointer of the object, etc...

Parameters
strmC++ i/o stream to dump the object to

Implements BESObj.


The documentation for this class was generated from the following file: