Go to the documentation of this file. 1 #ifndef __MESSAGEDISPATCHER_H_
2 #define __MESSAGEDISPATCHER_H_
9 #include <cpp-common/ICircularQueue.h>
11 #include <pheromones/IHiveMindHostDeserializer.h>
12 #include <pheromones/MessageDTO.h>
17 ICircularQueue<MessageDTO>& hostOutputQ,
18 ICircularQueue<MessageDTO>& remoteOutputQ,
19 ICircularQueue<MessageDTO>& interlocQ,
20 IHiveMindHostDeserializer& deserializer,
44 bool dispatchUserCall(
const MessageDTO& message,
const UserCallTargetDTO& dest);
47 bool dispatchRequest(
const MessageDTO& message,
const RequestDTO& request);
48 bool dispatchResponse(
const MessageDTO& message,
const ResponseDTO& response);
53 #endif // __MESSAGEDISPATCHER_H_
IHiveConnectHiveMindApiMessageHandler & m_hiveconnectApiMessageHandler
Definition: MessageDispatcher.h:38
IGreetSender & m_greetSender
Definition: MessageDispatcher.h:39
bool deserializeAndDispatch() override
deserialize a message and dispatches it in the appropriate queue
Definition: MessageDispatcher.cpp:27
ICircularQueue< MessageDTO > & m_buzzOutputQueue
Definition: MessageDispatcher.h:32
bool dispatchRequest(const MessageDTO &message, const RequestDTO &request)
Definition: MessageDispatcher.cpp:96
const IBSP & m_bsp
Definition: MessageDispatcher.h:40
bool dispatchUserCall(const MessageDTO &message, const UserCallTargetDTO &dest)
Definition: MessageDispatcher.cpp:60
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)
Definition: MessageDispatcher.cpp:5
~MessageDispatcher() override=default
bool dispatchUserCallResponse(const MessageDTO &message, const UserCallResponseDTO &response)
Definition: MessageDispatcher.cpp:90
Handles HiveMindApi requests and sends the response to the appropriate target.
Definition: IHiveMindHostApiRequestHandler.h:10
A class to manage message dispatching to queues, sending messages at the right place.
Definition: IMessageDispatcher.h:6
bool dispatchResponse(const MessageDTO &message, const ResponseDTO &response)
Definition: MessageDispatcher.cpp:118
Handles HiveConnectHiveMindApi messages and makes the proper request.
Definition: IHiveConnectHiveMindApiMessageHandler.h:9
bool dispatchUserCallRequest(const MessageDTO &message, const UserCallRequestDTO &request)
Definition: MessageDispatcher.cpp:84
IHiveMindHostDeserializer & m_deserializer
Definition: MessageDispatcher.h:36
bool dispatchMessage(const MessageDTO &message)
Definition: MessageDispatcher.cpp:131
A logger class with basic logging capabilities.
Definition: ILogger.h:35
ICircularQueue< MessageDTO > & m_hostOutputQueue
Definition: MessageDispatcher.h:33
bool dispatchBuzzMessage(const MessageDTO &message)
ILogger & m_logger
Definition: MessageDispatcher.h:41
ICircularQueue< MessageDTO > & m_interlocQueue
Definition: MessageDispatcher.h:35
ICircularQueue< MessageDTO > & m_remoteOutputQueue
Definition: MessageDispatcher.h:34
Definition: MessageDispatcher.h:14
Definition: IGreetSender.h:4
IHiveMindHostApiRequestHandler & m_hivemindApiReqHandler
Definition: MessageDispatcher.h:37