lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::EventBusService Class Reference

#include <EventBusService.h>

Inheritance diagram for lintel::EventBusService:
lintel::AbstractService< EventBusService > lintel::AbstractServiceInterface

Public Member Functions

 EventBusService (const std::shared_ptr< Configuration > &configuration, std::shared_ptr< ProcessName > processName, std::shared_ptr< SharedMemoryService > sharedMemoryService, std::shared_ptr< SharedMemorySegmentManager > segmentManager)
 
std::shared_ptr< IEventBus > of (const std::string &name)
 
void onInitialize () override
 
void onShutdown () override
 
- Public Member Functions inherited from lintel::AbstractService< EventBusService >
 AbstractService ()=delete
 
 AbstractService (std::string processName, std::string instanceName)
 
 AbstractService (std::string processName)
 
ShutdownPriority shutdownPriorityOf () const override
 
const std::string & getProcessName () const override
 
const std::string & getInstanceName () const override
 
std::string_view getClassName () const override
 
- Public Member Functions inherited from lintel::AbstractServiceInterface
virtual ~AbstractServiceInterface ()=default
 

Additional Inherited Members

- Protected Attributes inherited from lintel::AbstractService< EventBusService >
std::vector< std::shared_ptr< PropertyBase > > m_properties
 

Detailed Description

Service that manages the lifecycle and access to EventBus instances stored in shared memory segments. Consumers receive an IEventBus view that forwards to the EventBus object in the segment.

Constructor & Destructor Documentation

◆ EventBusService()

lintel::EventBusService::EventBusService ( const std::shared_ptr< Configuration > &  configuration,
std::shared_ptr< ProcessName >  processName,
std::shared_ptr< SharedMemoryService >  sharedMemoryService,
std::shared_ptr< SharedMemorySegmentManager >  segmentManager 
)

Construct an EventBusService.

Parameters
configurationthe application configuration
processNamethe current process name
sharedMemoryServicethe shared memory service
segmentManagerthe shared memory segment manager

Member Function Documentation

◆ of()

std::shared_ptr< IEventBus > lintel::EventBusService::of ( const std::string &  name)

Get a view of the named event bus.

Parameters
namethe bus name
Returns
a view over the shared memory bus
Exceptions
std::runtime_errorif the bus is not configured

◆ onInitialize()

void lintel::EventBusService::onInitialize ( )
overridevirtual

Construct all configured event buses in their segments.

Reimplemented from lintel::AbstractService< EventBusService >.

◆ onShutdown()

void lintel::EventBusService::onShutdown ( )
inlineoverridevirtual

Default shutdown does nothing; override in subclasses.

Reimplemented from lintel::AbstractService< EventBusService >.


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