A special event handler that serves discovery information and ignores the event itself. More...
#include <FauxEventHandler.h>
Public Member Functions | |
void | AddParameter (const std::string &key, data::discovery::Type type) |
Add a new parameter to serve for discovery. More... | |
virtual data::discovery::Schema | DescribeEvent (const std::string &name) override |
Handlers may add parameter descriptors to the event descriptor when asked to do so by overriding this method. More... | |
virtual void | EventWasTriggered (const Node *node, const data::event::Notification &event) override |
Handlers are notified using this method when an event has been triggered. More... | |
FauxEventHandler (const std::string &name) | |
Create a new fake event handler. More... | |
const std::string & | GetName () const |
Get the name of the event. More... | |
Private Attributes | |
std::string | _name |
Event name. More... | |
std::map< std::string, data::discovery::Type > | _parameters |
Parameters. More... | |
A special event handler that serves discovery information and ignores the event itself.
Definition at line 16 of file FauxEventHandler.h.
|
inline |
Create a new fake event handler.
name | Event name |
Definition at line 39 of file FauxEventHandler.h.
|
inline |
Add a new parameter to serve for discovery.
key | Parameter name |
type | Parameter type |
Definition at line 48 of file FauxEventHandler.h.
|
inlineoverridevirtual |
Handlers may add parameter descriptors to the event descriptor when asked to do so by overriding this method.
name | Name |
Implements swarmio::services::event::Handler.
Definition at line 70 of file FauxEventHandler.h.
|
inlineoverridevirtual |
Handlers are notified using this method when an event has been triggered.
node | Source node |
event | Event |
Implements swarmio::services::event::Handler.
Definition at line 61 of file FauxEventHandler.h.
|
inline |
Get the name of the event.
Definition at line 92 of file FauxEventHandler.h.
|
private |
Event name.
Definition at line 24 of file FauxEventHandler.h.
|
private |
Parameters.
Definition at line 30 of file FauxEventHandler.h.