5#include "control/IMessageHandler.hpp"
6#include "message/MessageFrame.hpp"
13 std::map<MessageType, IMessageHandler*> handlers;
31 bool dispatch(
const std::string& messageId,
const std::string& payload, MessageType type,
System& system);
Definition HandlerDispatcher.hpp:11
void registerHandler(MessageType type, IMessageHandler *handler)
Registers a handler for a specific message type.
Definition HandlerDispatcher.cpp:5
bool dispatch(const std::string &messageId, const std::string &payload, MessageType type, System &system)
Dispatches a message to the appropriate handler.
Definition HandlerDispatcher.cpp:14
bool hasHandler(MessageType type) const
Checks if a handler is registered for a message type.
Definition HandlerDispatcher.cpp:30
size_t getHandlerCount() const
Gets the number of registered handlers.
Definition HandlerDispatcher.cpp:34
Definition IMessageHandler.hpp:9