RSB
0.7.0
|
A rsb::Handler for rsb::Listener s that pushes all received events on a rsc::SynchronizedQueue. More...
#include <EventQueuePushHandler.h>
Public Member Functions | |
EventQueuePushHandler (boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > > queue, const std::string &method="") | |
Constructs a new instance. | |
std::string | getClassName () const |
void | printContents (std::ostream &stream) const |
void | handle (EventPtr event) |
Handle event. | |
Public Member Functions inherited from rsb::Handler | |
std::set< std::string > | getMethods () const |
Returns the desired set of methods this handler can handle. | |
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. | |
Handler (const std::set< std::string > &methods) | |
Creates a new handler that only accepts events with the specified methods. | |
virtual | ~Handler () |
A rsb::Handler for rsb::Listener s that pushes all received events on a rsc::SynchronizedQueue.
Definition at line 44 of file EventQueuePushHandler.h.
rsb::EventQueuePushHandler::EventQueuePushHandler | ( | boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > > | queue, |
const std::string & | method = "" |
||
) |
Constructs a new instance.
queue | the queue to push received data on |
method | method of this handler to react on, empty means all events |
Definition at line 33 of file EventQueuePushHandler.cpp.
string rsb::EventQueuePushHandler::getClassName | ( | ) | const |
Reimplemented from rsb::Handler.
Definition at line 39 of file EventQueuePushHandler.cpp.
|
virtual |
Handle event.
event | The event that should be handled. |
Implements rsb::eventprocessing::Handler.
Definition at line 47 of file EventQueuePushHandler.cpp.
References queue.
void rsb::EventQueuePushHandler::printContents | ( | std::ostream & | stream | ) | const |
Definition at line 43 of file EventQueuePushHandler.cpp.
References queue.
|
private |
Definition at line 64 of file EventQueuePushHandler.h.
Referenced by handle(), and printContents().