HiveMind
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MessageDispatcher Class Reference

#include <MessageDispatcher.h>

Inheritance diagram for MessageDispatcher:
Inheritance graph
Collaboration diagram for MessageDispatcher:
Collaboration graph

Public Member Functions

 MessageDispatcher (ICircularQueue< MessageDTO > &buzzOutputQ, ICircularQueue< MessageDTO > &hostOutputQ, ICircularQueue< MessageDTO > &remoteOutputQ, ICircularQueue< MessageDTO > &interlocQ, IHiveMindHostDeserializer &deserializer, IHiveMindHostApiRequestHandler &hivemindApiReqHandler, IHiveConnectHiveMindApiMessageHandler &hiveconnectApiMessageHandler, IGreetSender &greetSender, const IBSP &bsp, ILogger &logger)
 
 ~MessageDispatcher () override=default
 
bool deserializeAndDispatch () override
 deserialize a message and dispatches it in the appropriate queue More...
 

Private Member Functions

bool dispatchUserCall (const MessageDTO &message, const UserCallTargetDTO &dest)
 
bool dispatchUserCallRequest (const MessageDTO &message, const UserCallRequestDTO &request)
 
bool dispatchUserCallResponse (const MessageDTO &message, const UserCallResponseDTO &response)
 
bool dispatchRequest (const MessageDTO &message, const RequestDTO &request)
 
bool dispatchResponse (const MessageDTO &message, const ResponseDTO &response)
 
bool dispatchBuzzMessage (const MessageDTO &message)
 
bool dispatchMessage (const MessageDTO &message)
 
- Private Member Functions inherited from IMessageDispatcher
virtual ~IMessageDispatcher ()=default
 

Private Attributes

ICircularQueue< MessageDTO > & m_buzzOutputQueue
 
ICircularQueue< MessageDTO > & m_hostOutputQueue
 
ICircularQueue< MessageDTO > & m_remoteOutputQueue
 
ICircularQueue< MessageDTO > & m_interlocQueue
 
IHiveMindHostDeserializer & m_deserializer
 
IHiveMindHostApiRequestHandlerm_hivemindApiReqHandler
 
IHiveConnectHiveMindApiMessageHandlerm_hiveconnectApiMessageHandler
 
IGreetSenderm_greetSender
 
const IBSPm_bsp
 
ILoggerm_logger
 

Constructor & Destructor Documentation

◆ MessageDispatcher()

MessageDispatcher::MessageDispatcher ( ICircularQueue< MessageDTO > &  buzzOutputQ,
ICircularQueue< MessageDTO > &  hostOutputQ,
ICircularQueue< MessageDTO > &  remoteOutputQ,
ICircularQueue< MessageDTO > &  interlocQ,
IHiveMindHostDeserializer &  deserializer,
IHiveMindHostApiRequestHandler hivemindApiReqHandler,
IHiveConnectHiveMindApiMessageHandler hiveconnectApiMessageHandler,
IGreetSender greetSender,
const IBSP bsp,
ILogger logger 
)

◆ ~MessageDispatcher()

MessageDispatcher::~MessageDispatcher ( )
overridedefault

Member Function Documentation

◆ deserializeAndDispatch()

bool MessageDispatcher::deserializeAndDispatch ( )
overridevirtual

deserialize a message and dispatches it in the appropriate queue

Returns
true if the serialization and the dispatch was successful, false if any of those were not

Implements IMessageDispatcher.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dispatchBuzzMessage()

bool MessageDispatcher::dispatchBuzzMessage ( const MessageDTO &  message)
private

◆ dispatchMessage()

bool MessageDispatcher::dispatchMessage ( const MessageDTO &  message)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dispatchRequest()

bool MessageDispatcher::dispatchRequest ( const MessageDTO &  message,
const RequestDTO &  request 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dispatchResponse()

bool MessageDispatcher::dispatchResponse ( const MessageDTO &  message,
const ResponseDTO &  response 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dispatchUserCall()

bool MessageDispatcher::dispatchUserCall ( const MessageDTO &  message,
const UserCallTargetDTO &  dest 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dispatchUserCallRequest()

bool MessageDispatcher::dispatchUserCallRequest ( const MessageDTO &  message,
const UserCallRequestDTO &  request 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dispatchUserCallResponse()

bool MessageDispatcher::dispatchUserCallResponse ( const MessageDTO &  message,
const UserCallResponseDTO &  response 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_bsp

const IBSP& MessageDispatcher::m_bsp
private

◆ m_buzzOutputQueue

ICircularQueue<MessageDTO>& MessageDispatcher::m_buzzOutputQueue
private

◆ m_deserializer

IHiveMindHostDeserializer& MessageDispatcher::m_deserializer
private

◆ m_greetSender

IGreetSender& MessageDispatcher::m_greetSender
private

◆ m_hiveconnectApiMessageHandler

IHiveConnectHiveMindApiMessageHandler& MessageDispatcher::m_hiveconnectApiMessageHandler
private

◆ m_hivemindApiReqHandler

IHiveMindHostApiRequestHandler& MessageDispatcher::m_hivemindApiReqHandler
private

◆ m_hostOutputQueue

ICircularQueue<MessageDTO>& MessageDispatcher::m_hostOutputQueue
private

◆ m_interlocQueue

ICircularQueue<MessageDTO>& MessageDispatcher::m_interlocQueue
private

◆ m_logger

ILogger& MessageDispatcher::m_logger
private

◆ m_remoteOutputQueue

ICircularQueue<MessageDTO>& MessageDispatcher::m_remoteOutputQueue
private

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