RSB  0.19.0
rsb::util::EventQueuePushHandler Class Reference

A rsb::Handler for rsb::Listener s that pushes all received events on a rsc::SynchronizedQueue. More...

#include <EventQueuePushHandler.h>

Inheritance diagram for rsb::util::EventQueuePushHandler:
Inheritance graph
Collaboration diagram for rsb::util::EventQueuePushHandler:
Collaboration graph

Public Member Functions

 EventQueuePushHandler (boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > > queue, const std::string &method="")
 Constructs a new instance. More...
 
std::string getClassName () const
 
void printContents (std::ostream &stream) const
 
void handle (EventPtr event)
 Handle event. More...
 
- Public Member Functions inherited from rsb::Handler
std::set< std::string > getMethods () const
 Returns the desired set of methods this handler can handle. More...
 
bool acceptsMethod (const std::string &method) const
 

Private Attributes

boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > > queue
 

Additional Inherited Members

- Protected Member Functions inherited from rsb::Handler
 Handler (const std::string &method="")
 Creates a new handler that only accepts events for the specified method. More...
 
 Handler (const std::set< std::string > &methods)
 Creates a new handler that only accepts events with the specified methods. More...
 
virtual ~Handler ()
 
std::string getClassName () const
 

Detailed Description

A rsb::Handler for rsb::Listener s that pushes all received events on a rsc::SynchronizedQueue.

Author
jwienke

Definition at line 45 of file EventQueuePushHandler.h.

Constructor & Destructor Documentation

rsb::util::EventQueuePushHandler::EventQueuePushHandler ( boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > >  queue,
const std::string &  method = "" 
)

Constructs a new instance.

Parameters
queuethe queue to push received data on
methodmethod of this handler to react on, empty means all events

Definition at line 34 of file EventQueuePushHandler.cpp.

Member Function Documentation

string rsb::util::EventQueuePushHandler::getClassName ( ) const

Definition at line 40 of file EventQueuePushHandler.cpp.

void rsb::util::EventQueuePushHandler::handle ( EventPtr  event)
virtual

Handle event.

Parameters
eventThe event that should be handled.

Implements rsb::eventprocessing::Handler.

Definition at line 48 of file EventQueuePushHandler.cpp.

References queue.

void rsb::util::EventQueuePushHandler::printContents ( std::ostream &  stream) const

Definition at line 44 of file EventQueuePushHandler.cpp.

References queue.

Member Data Documentation

boost::shared_ptr<rsc::threading::SynchronizedQueue<EventPtr> > rsb::util::EventQueuePushHandler::queue
private

Definition at line 65 of file EventQueuePushHandler.h.

Referenced by handle(), and printContents().


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