ledger-core
|
#include <EventPublisher.hpp>
Public Member Functions | |
virtual std::shared_ptr< EventBus > | getEventBus ()=0 |
virtual void | post (const std::shared_ptr< Event > &event)=0 |
virtual void | postSticky (const std::shared_ptr< Event > &event, int32_t tag)=0 |
virtual void | relay (const std::shared_ptr< EventBus > &bus)=0 |
Static Public Member Functions | |
static std::shared_ptr< EventPublisher > | newInstance (const std::shared_ptr< ExecutionContext > &context) |
Class representing an event publisher.
|
pure virtual |
Get event bus through which publisher broadcast its events.
Implemented in ledger::core::EventPublisher.
|
static |
Create a new instance of EventPublisher class.
context,executionContext | object, context in which event publisher broadcast its events |
|
pure virtual |
|
pure virtual |
Same as post method but with an sticky event.
event,Event | object |
tag,32 | bits integer, tag of sticky event |
|
pure virtual |
Relay an event to another EventBus (other than EventPublisher's event bus).
bus,EventBus | object, through which we want to broadcast EventPublisher's event to EventPublisher's receiver |