39 #include "BESRequestHandlerList.h" 42 #include "BESResponseHandlerList.h" 43 #include "BESResponseNames.h" 44 #include "BESXMLCommand.h" 46 #include "SampleModule.h" 47 #include "SampleRequestHandler.h" 48 #include "SampleResponseNames.h" 49 #include "SampleSayResponseHandler.h" 50 #include "SampleSayXMLCommand.h" 52 void SampleModule::initialize(
const string &modname)
54 BESDEBUG(modname,
"Initializing Sample Module " << modname << endl);
58 BESResponseHandlerList::TheList()->
add_handler(SAY_RESPONSE, SampleSayResponseHandler::SampleSayResponseBuilder);
64 BESDEBUG(modname,
"Done Initializing Sample Module " << modname << endl);
67 void SampleModule::terminate(
const string &modname)
69 BESDEBUG(modname,
"Cleaning Sample module " << modname << endl);
78 BESDEBUG(modname,
"Done Cleaning Sample module " << modname << endl);
90 strm << BESIndent::LMarg <<
"SampleModule::dump - (" << (
void *)
this <<
")" << endl;
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
static void Register(const std::string &flagName)
register the specified debug flag
virtual bool add_handler(const 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
static bool del_command(const std::string &cmd_str)
Deletes the command called cmd_str from the list of possible commands.
Represents a specific data type request handler.
static void add_command(const std::string &cmd_str, p_xmlcmd_builder cmd)
Add a command to the possible commands allowed by this BES.
virtual bool remove_handler(const string &handler)
removes a response handler from the list
virtual BESRequestHandler * remove_handler(const string &handler_name)
remove and return the specified request handler