33 #include <BESXDModule.h> 36 #include <BESDapNames.h> 37 #include <BESResponseNames.h> 38 #include <BESResponseHandlerList.h> 39 #include <BESRequestHandlerList.h> 41 #include <BESDapService.h> 43 #include <BESTransmitter.h> 44 #include <BESReturnManager.h> 45 #include <BESTransmitterNames.h> 47 #include "BESXDNames.h" 48 #include "BESXDResponseHandler.h" 49 #include "BESXDRequestHandler.h" 50 #include "BESXDTransmit.h" 52 void BESXDModule::initialize(
const string &modname)
54 BESDEBUG(
"xd",
"Initializing OPeNDAP XD module " << modname << endl);
57 BESRequestHandlerList::TheList()->
add_handler(modname, handler);
59 BESResponseHandlerList::TheList()->
add_handler(XD_RESPONSE, BESXDResponseHandler::XDResponseBuilder);
63 BESTransmitter *t = BESReturnManager::TheManager()->find_transmitter(DAP2_FORMAT);
65 t->add_method(XD_TRANSMITTER, BESXDTransmit::send_basic_ascii);
69 BESDEBUG(
"xd",
"Done Initializing OPeNDAP XD module " << modname << endl);
72 void BESXDModule::terminate(
const string &modname)
74 BESDEBUG(
"xd",
"Cleaning OPeNDAP XD module " << modname << endl);
82 BESTransmitter *t = BESReturnManager::TheManager()->find_transmitter(DAP2_FORMAT);
84 t->remove_method(XD_TRANSMITTER);
86 t = BESReturnManager::TheManager()->find_transmitter(DAP2_FORMAT);
88 t->remove_method(XD_TRANSMITTER);
90 BESDEBUG(
"xd",
"Done Cleaning OPeNDAP XD module " << modname << endl);
101 strm << BESIndent::LMarg <<
"BESXDModule::dump - (" << (
void *)
this <<
")" << endl;
static void add_to_dap_service(const string &cmd, const string &desc)
static function to add commands to the dap service
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 bool add_handler(const string &handler, p_response_handler handler_method)
add a response handler to the list
Represents a specific data type request handler.
virtual bool remove_handler(const string &handler)
removes a response handler from the list
virtual void dump(ostream &strm) const
dumps information about this object
virtual BESRequestHandler * remove_handler(const std::string &handler_name)
remove and return the specified request handler