33 Handler::Handler(
const string& method) {
34 if (!method.empty()) {
35 methods.insert(method);
39 Handler::Handler(
const set<string>& methods) :
58 const string& method) :
59 Handler(method), function(function) {
63 return "EventFunctionHandler";
67 stream <<
"function = " <<
function;
71 this->
function(event);
EventFunctionHandler(const EventFunction &function, const std::string &method="")
Asynchronously called handler interface on the client level.
std::set< std::string > getMethods() const
Returns the desired set of methods this handler can handle.
boost::function< void(EventPtr)> EventFunction
void handle(EventPtr event)
Handle event.
bool acceptsMethod(const std::string &method) const
void printContents(std::ostream &stream) const
std::string getClassName() const
std::set< std::string > methods
boost::shared_ptr< Event > EventPtr