client-cpp  0.10.0
kaa::EventManager Class Reference

#include <EventManager.hpp>

+ Inheritance diagram for kaa::EventManager:
+ Collaboration diagram for kaa::EventManager:

Public Member Functions

 EventManager (IKaaClientContext &context)
 
virtual void registerEventFamily (IEventFamily *eventFamily)
 
virtual void produceEvent (const std::string &fqn, const std::vector< std::uint8_t > &data, const std::string &target, TransactionIdPtr trxId)
 
virtual void onEventsReceived (const EventSyncResponse::events_t &events)
 
virtual void onEventListenersReceived (const EventSyncResponse::eventListenersResponses_t &listeners)
 
virtual std::map< std::int32_t,
Event > 
releasePendingEvents ()
 
virtual bool hasPendingEvents () const
 
virtual std::map< std::int32_t,
std::list< std::string > > 
getPendingListenerRequests ()
 
virtual bool hasPendingListenerRequests () const
 
virtual std::int32_t findEventListeners (const std::list< std::string > &eventFQNs, IFetchEventListenersPtr listener)
 
virtual void setTransport (EventTransport *transport)
 
virtual TransactionIdPtr beginTransaction ()
 
virtual void commit (TransactionIdPtr trxId, IKaaClientContext &context_)
 
virtual void rollback (TransactionIdPtr trxId)
 
- Public Member Functions inherited from kaa::IEventManager
virtual ~IEventManager ()
 
- Public Member Functions inherited from kaa::IEventListenersResolver
virtual ~IEventListenersResolver ()
 
- Public Member Functions inherited from kaa::IEventDataProcessor
virtual ~IEventDataProcessor ()
 
- Public Member Functions inherited from kaa::AbstractTransactable< std::list< Event > >
virtual TransactionIdPtr beginTransaction (IKaaClientContext &context_)
 
virtual void rollback (TransactionIdPtr trxId, IKaaClientContext &context_)
 
std::list< Event > & getContainerByTrxId (TransactionIdPtr trxId, IKaaClientContext &context_)
 
virtual ~AbstractTransactable ()
 
- Public Member Functions inherited from kaa::ITransactable
virtual ~ITransactable ()
 

Additional Inherited Members

- Protected Member Functions inherited from kaa::AbstractTransactable< std::list< Event > >
 KAA_MUTEX_DECLARE (transactionsGuard_)
 
- Protected Attributes inherited from kaa::AbstractTransactable< std::list< Event > >
std::map< TransactionIdPtr,
std::list< Event > > 
transactions_
 

Detailed Description

Definition at line 42 of file EventManager.hpp.

Constructor & Destructor Documentation

kaa::EventManager::EventManager ( IKaaClientContext context)
inline

Definition at line 48 of file EventManager.hpp.

Member Function Documentation

virtual TransactionIdPtr kaa::EventManager::beginTransaction ( )
inlinevirtual

Definition at line 74 of file EventManager.hpp.

virtual void kaa::EventManager::commit ( TransactionIdPtr  trxId,
IKaaClientContext context_ 
)
virtual

Finish the transaction.

Parameters
trxIdIdentifier of the transaction which must be finished.
[in]Kaaclient context

Implements kaa::ITransactable.

virtual std::int32_t kaa::EventManager::findEventListeners ( const std::list< std::string > &  eventFQNs,
IFetchEventListenersPtr  listener 
)
virtual

Submits an event listeners resolution request

Parameters
eventFQNsList of event class FQNs which have to be supported by endpoint.
listenerResult listener IFetchEventListeners}
Exceptions
KaaExceptionwhen data is invalid (empty list or null listener)
Returns
Request ID of submitted request

Implements kaa::IEventListenersResolver.

virtual std::map<std::int32_t, std::list<std::string> > kaa::EventManager::getPendingListenerRequests ( )
virtual
virtual bool kaa::EventManager::hasPendingEvents ( ) const
virtual
virtual bool kaa::EventManager::hasPendingListenerRequests ( ) const
virtual
virtual void kaa::EventManager::onEventListenersReceived ( const EventSyncResponse::eventListenersResponses_t &  listeners)
virtual
virtual void kaa::EventManager::onEventsReceived ( const EventSyncResponse::events_t &  events)
virtual
virtual void kaa::EventManager::produceEvent ( const std::string &  fqn,
const std::vector< std::uint8_t > &  data,
const std::string &  target,
TransactionIdPtr  trxId 
)
virtual

Creates an Event and passes it to OPS

Parameters
eventFqnFully qualified name of the Event
dataEvent data
targetEvent target, null for event broadcasting.

Implements kaa::IEventManager.

virtual void kaa::EventManager::registerEventFamily ( IEventFamily eventFamily)
virtual

Add event family object which can handle specified event.

Parameters
eventFamilyevent family instance
See Also
IEventFamily

Implements kaa::IEventManager.

virtual std::map<std::int32_t, Event> kaa::EventManager::releasePendingEvents ( )
virtual
virtual void kaa::EventManager::rollback ( TransactionIdPtr  trxId)
inlinevirtual

Definition at line 82 of file EventManager.hpp.

virtual void kaa::EventManager::setTransport ( EventTransport transport)
virtual

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