33 #include <BESRequestHandlerList.h>
35 #include <BESResponseHandlerList.h>
36 #include <BESResponseNames.h>
37 #include <BESContainerStorageList.h>
38 #include <TheBESKeys.h>
39 #include <BESSyntaxUserError.h>
41 #include "GatewayModule.h"
42 #include "GatewayRequestHandler.h"
43 #include "GatewayResponseNames.h"
44 #include "GatewayContainerStorage.h"
45 #include "GatewayUtils.h"
46 #include "GatewayPathInfoResponseHandler.h"
47 #include "GatewayPathInfoCommand.h"
50 using namespace gateway;
52 void GatewayModule::initialize(
const string &modname)
54 BESDEBUG(modname,
"Initializing Gateway Module " << modname << endl);
56 BESDEBUG(modname,
" adding " << modname <<
" request handler" << endl);
59 BESDEBUG(modname,
" adding " << modname <<
" container storage" << endl);
62 BESDEBUG(modname,
" initialize the gateway utilities and params" << endl);
63 GatewayUtils::Initialize();
65 BESDEBUG(modname,
" adding Gateway debug context" << endl);
68 BESDEBUG( modname,
" adding " << SHOW_GATEWAY_PATH_INFO_RESPONSE_STR <<
" command" << endl ) ;
71 BESDEBUG(modname,
" adding " << SHOW_GATEWAY_PATH_INFO_RESPONSE <<
" response handler" << endl ) ;
72 BESResponseHandlerList::TheList()->
add_handler( SHOW_GATEWAY_PATH_INFO_RESPONSE, GatewayPathInfoResponseHandler::GatewayPathInfoResponseBuilder ) ;
74 BESDEBUG(modname,
"Done Initializing Gateway Module " << modname << endl);
77 void GatewayModule::terminate(
const string &modname)
79 BESDEBUG(modname,
"Cleaning Gateway module " << modname << endl);
81 BESResponseHandlerList::TheList()->
remove_handler( SHOW_GATEWAY_PATH_INFO_RESPONSE) ;
85 BESDEBUG(modname,
" removing " << modname <<
" request handler" << endl);
93 BESDEBUG(modname,
"Done Cleaning Gateway module " << modname << endl);
96 void GatewayModule::dump(ostream &strm)
const
98 strm << BESIndent::LMarg <<
"GatewayModule::dump - (" << (
void *)
this <<
")" << endl;