57 static const char*
const NCML_CATALOG =
"catalog";
61 BESDEBUG(modname,
"Initializing NCML Module " << modname << endl);
63 BESDEBUG(modname,
" adding " << modname <<
" request handler" << endl);
70 addCommandAndResponseHandlers(modname);
73 BESDEBUG(modname, modname <<
" handles dap services" << endl);
76 BESDEBUG(modname,
" adding " << NCML_CATALOG <<
" catalog" << endl);
81 BESDEBUG(modname,
" catalog already exists, skipping" << endl);
84 BESDEBUG(modname,
" adding catalog container storage " << NCML_CATALOG << endl);
90 BESDEBUG(modname,
" storage already exists, skipping" << endl);
93 BESDEBUG(modname,
" adding " << modname <<
" container storage" << endl);
96 string key =
"NCML.TempDirectory";
97 BESDEBUG( modname,
" checking " << key <<
" parameter" << endl );
101 if (!found || val.empty() || val ==
"/") {
102 string err = (string)
"The parameter " + key +
" must be set to use the NCML module";
107 BESDEBUG(modname,
" adding NCML debug context" << endl);
110 BESDEBUG(modname,
"Done Initializing NCML Module " << modname << endl);
115 BESDEBUG(modname,
"Cleaning NCML module " << modname << endl);
117 BESDEBUG(modname,
" removing " << modname <<
" request handler" << endl);
124 removeCommandAndResponseHandlers();
127 BESDEBUG(modname,
" removing catalog container storage" << NCML_CATALOG << endl);
130 BESDEBUG( modname,
" removing ncml container storage" << endl );
133 BESDEBUG(modname,
" removing " << NCML_CATALOG <<
" catalog" << endl);
137 BESDEBUG(modname,
"Done Cleaning NCML module " << modname << endl);
149 strm <<
BESIndent::LMarg <<
"NCMLModule::dump - (" << (
void *)
this <<
")" << endl;
154 void NCMLModule::addCommandAndResponseHandlers(
const string& modname)
156 BESDEBUG(modname,
"Adding module extensions..." << endl);
157 addCacheAggCommandAndResponseHandlers(modname);
158 BESDEBUG(modname,
"... done adding module extensions." << endl);
161 void NCMLModule::addCacheAggCommandAndResponseHandlers(
const string& modname)
167 <<
" response handler" << endl );
170 BESDEBUG(modname,
" adding " << cmdName <<
" command" << endl );
174 void NCMLModule::removeCommandAndResponseHandlers()
177 removeCacheAggCommandAndResponseHandlers();
181 void NCMLModule::removeCacheAggCommandAndResponseHandlers()
186 <<
" response handler" << endl );
static bool del_command(const string &cmd_str)
Deletes the command called cmd_str from the list of possible commands.
static void add_command(const string &cmd_str, p_xmlcmd_builder cmd)
Add a command to the possible commands allowed by this BES.
exception thrown if inernal error encountered
virtual bool add_handler(const string &handler_name, BESRequestHandler *handler)
add a request handler to the list of registered handlers for this server
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
virtual bool add_catalog(BESCatalog *catalog)
adds the speciifed catalog to the list
virtual void terminate(const string &modname)
virtual bool add_persistence(BESContainerStorage *p)
Add a persistent store to the list.
implementation of BESContainerStorage that represents a data within a catalog repository ...
static BESXMLCommand * makeInstance(const BESDataHandlerInterface &baseDHI)
static string NCML_TempDir
static const std::string CACHE_AGG_RESPONSE
Response name in the DHI for the cache of aggregations command.
BESAbstractModule * maker()
virtual bool deref_catalog(const string &catalog_name)
de-reference the specified catalog and remove from list if no longer referenced
builds catalogs from a directory structure
static ostream & LMarg(ostream &strm)
virtual bool deref_persistence(const string &persist_name)
dereference a persistent store in the list.
virtual void initialize(const string &modname)
virtual bool add_handler(const string &handler, p_response_handler handler_method)
add a response handler to the list
implementation of BESContainerStorageVolatile that represents a list of NCML requests ...
Represents a specific data type request handler.
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
static BESRequestHandlerList * TheList()
static BESContainerStorageList * TheList()
virtual bool remove_handler(const string &handler)
removes a response handler from the list
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
Handler for AIS Using NCML.
static BESCatalogList * TheCatalogList()
returns the singleton BESCatalogList instance.
static BESKeys * TheKeys()
static void Register(const string &flagName)
register the specified debug flag
static const std::string NCML_NAME
The name used to specify an ncml file.
static void handle_dap_service(const string &handler)
static function to register a handler to handle the dap services
static BESResponseHandler * makeInstance(const string &name)
static BESResponseHandlerList * TheList()
virtual BESRequestHandler * remove_handler(const string &handler_name)
remove and return the specified request handler