33 #include "BESTransmitter.h" 34 #include "BESInternalError.h" 36 bool BESTransmitter::add_method(
string method_name, p_transmitter trans_method)
38 BESTransmitter::_method_citer i;
39 i = _method_list.find(method_name);
40 if (i == _method_list.end()) {
41 _method_list[method_name] = trans_method;
47 bool BESTransmitter::remove_method(
string method_name)
49 BESTransmitter::_method_iter i;
50 i = _method_list.find(method_name);
51 if (i != _method_list.end()) {
52 _method_list.erase(i);
58 p_transmitter BESTransmitter::find_method(
string method_name)
60 BESTransmitter::_method_citer i;
61 i = _method_list.find(method_name);
62 if (i != _method_list.end()) {
63 p_transmitter p = (*i).second;
71 p_transmitter p = find_method(method_name);
76 throw BESInternalError(
string(
"Unable to transmit response, no transmitter for ") + method_name, __FILE__,
90 strm << BESIndent::LMarg <<
"BESTransmitter::dump - (" << (
void *)
this <<
")" << endl;
92 if (_method_list.size()) {
93 strm << BESIndent::LMarg <<
"registered methods:" << endl;
95 _method_citer i = _method_list.begin();
96 _method_citer ie = _method_list.end();
97 for (; i != ie; i++) {
98 strm << BESIndent::LMarg << (*i).first <<
": " << (
void *) (*i).second << endl;
100 BESIndent::UnIndent();
103 strm << BESIndent::LMarg <<
"registered methods: none" << endl;
105 BESIndent::UnIndent();
exception thrown if inernal error encountered
virtual void dump(ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
Abstract base class representing a specific set of information in response to a request to the BES...