32#include <BESRequestHandlerList.h>
34#include <BESResponseHandlerList.h>
35#include <BESContainerStorageList.h>
37#include "GatewayModule.h"
38#include "GatewayRequestHandler.h"
39#include "GatewayContainerStorage.h"
40#include "GatewayPathInfoResponseHandler.h"
41#include "GatewayPathInfoCommand.h"
44using namespace gateway;
46void GatewayModule::initialize(
const string &modname)
48 BESDEBUG(modname,
"Initializing Gateway Module " << modname << endl);
50 BESDEBUG(modname,
" adding " << modname <<
" request handler" << endl);
53 BESDEBUG(modname,
" adding " << modname <<
" container storage" << endl);
60 BESDEBUG(modname,
" adding Gateway debug context" << endl);
63 BESDEBUG( modname,
" adding " << SHOW_GATEWAY_PATH_INFO_RESPONSE_STR <<
" command" << endl ) ;
66 BESDEBUG(modname,
" adding " << SHOW_GATEWAY_PATH_INFO_RESPONSE <<
" response handler" << endl ) ;
67 BESResponseHandlerList::TheList()->
add_handler( SHOW_GATEWAY_PATH_INFO_RESPONSE, GatewayPathInfoResponseHandler::GatewayPathInfoResponseBuilder ) ;
69 BESDEBUG(modname,
"Done Initializing Gateway Module " << modname << endl);
72void GatewayModule::terminate(
const string &modname)
74 BESDEBUG(modname,
"Cleaning Gateway module " << modname << endl);
76 BESResponseHandlerList::TheList()->
remove_handler( SHOW_GATEWAY_PATH_INFO_RESPONSE) ;
80 BESDEBUG(modname,
" removing " << modname <<
" request handler" << endl);
88 BESDEBUG(modname,
"Done Cleaning Gateway module " << modname << endl);
93 strm << BESIndent::LMarg <<
"GatewayModule::dump - (" << (
void *)
this <<
")" << endl;
virtual bool add_persistence(BESContainerStorage *p)
Add a persistent store to the list.
virtual bool deref_persistence(const std::string &persist_name)
dereference a persistent store in the list.
static void Register(const std::string &flagName)
register the specified debug flag
virtual bool add_handler(const std::string &handler_name, BESRequestHandler *handler)
add a request handler to the list of registered handlers for this server
virtual BESRequestHandler * remove_handler(const std::string &handler_name)
remove and return the specified request handler
Represents a specific data type request handler.
virtual bool remove_handler(const std::string &handler)
removes a response handler from the list
virtual bool add_handler(const std::string &handler, p_response_handler handler_method)
add a response handler to the list
static void del_command(const std::string &cmd_str)
Deletes the command called cmd_str from the list of possible commands.
static void add_command(const std::string &cmd_str, p_xmlcmd_builder cmd)
Add a command to the possible commands allowed by this BES.
implementation of BESContainerStorageVolatile that represents a list of remote requests
virtual void dump(std::ostream &strm) const
dump the contents of this object to the specified ostream