30#include <BESRequestHandlerList.h>
31#include <BESResponseHandlerList.h>
32#include <BESResponseNames.h>
34#include <BESContainerStorageList.h>
35#include <BESFileContainerStorage.h>
36#include <BESCatalogDirectory.h>
37#include <BESCatalogList.h>
38#include <BESDapService.h>
43#include "HttpdCatalogNames.h"
44#include "HttpdCatalogModule.h"
45#include "HttpdCatalogContainerStorage.h"
46#include "HttpdCatalog.h"
50#define prolog string("HttpdCatalogModule::").append(__func__).append("() - ")
52namespace httpd_catalog {
54void HttpdCatalogModule::initialize(
const string &modname)
58 BESDEBUG(MODULE, prolog <<
"Initializing Module: " << modname << endl);
60 if (!BESCatalogList::TheCatalogList()->ref_catalog(HTTPD_CATALOG_NAME)) {
61 BESCatalogList::TheCatalogList()->add_catalog(
new HttpdCatalog(HTTPD_CATALOG_NAME));
64 if (!BESContainerStorageList::TheList()->ref_persistence(HTTPD_CATALOG_NAME)) {
65 BESContainerStorageList::TheList()->add_persistence(
new HttpdCatalogContainerStorage(HTTPD_CATALOG_NAME));
68 BESDEBUG(MODULE,
"Done Initializing Handler: " << modname << endl);
71void HttpdCatalogModule::terminate(
const string &modname)
73 BESDEBUG(MODULE, prolog <<
"Cleaning Module: " << modname << endl);
75 BESContainerStorageList::TheList()->deref_persistence(HTTPD_CATALOG_NAME);
77 BESCatalogList::TheCatalogList()->deref_catalog(HTTPD_CATALOG_NAME);
79 BESDEBUG(MODULE, prolog <<
"Done Cleaning Module: " << modname << endl);
83BESAbstractModule *maker()
91 strm << BESIndent::LMarg << prolog<<
"(" << (
void *)
this <<
")" << endl;
static void Register(const std::string &flagName)
register the specified debug flag
virtual void dump(std::ostream &strm) const
dump the contents of this object to the specified ostream