RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::Handler Class Reference

Asynchronously called handler interface on the client level. More...

#include <Handler.h>

Inheritance diagram for rsb::Handler:
Inheritance graph
Collaboration diagram for rsb::Handler:
Collaboration graph

Public Member Functions

std::set< std::string > getMethods () const
 Returns the desired set of methods this handler can handle.
bool acceptsMethod (const std::string &method) const
- Public Member Functions inherited from rsb::eventprocessing::Handler
virtual void handle (EventPtr event)=0
 Handle event.

Protected Member Functions

 Handler (const std::string &method="")
 Creates a new handler that only accepts events for the specified method.
 Handler (const std::set< std::string > &methods)
 Creates a new handler that only accepts events with the specified methods.
virtual ~Handler ()
std::string getClassName () const

Private Attributes

std::set< std::string > methods

Detailed Description

Asynchronously called handler interface on the client level.

Handler may have associated methods and are only called for events that match their desired method.

Author
jwienke

Definition at line 53 of file Handler.h.

Constructor & Destructor Documentation

rsb::Handler::Handler ( const std::string &  method = "")
explicitprotected

Creates a new handler that only accepts events for the specified method.

Parameters
methodthe accepted method of this handler or empty string for all methods

Definition at line 33 of file Handler.cpp.

rsb::Handler::Handler ( const std::set< std::string > &  methods)
explicitprotected

Creates a new handler that only accepts events with the specified methods.

Parameters
methodsset of desired methods, empty for all methods

Definition at line 39 of file Handler.cpp.

rsb::Handler::~Handler ( )
protectedvirtual

Reimplemented from rsb::eventprocessing::Handler.

Definition at line 43 of file Handler.cpp.

Member Function Documentation

bool rsb::Handler::acceptsMethod ( const std::string &  method) const

Definition at line 50 of file Handler.cpp.

References methods.

std::string rsb::Handler::getClassName ( ) const
inlineprotected
set< string > rsb::Handler::getMethods ( ) const

Returns the desired set of methods this handler can handle.

An empty set means no restrictions on methods are placed.

Returns
set of desired methods or empty for all methods

Definition at line 46 of file Handler.cpp.

References methods.

Member Data Documentation

std::set<std::string> rsb::Handler::methods
private

Definition at line 89 of file Handler.h.

Referenced by acceptsMethod(), and getMethods().


The documentation for this class was generated from the following files: