Go to the documentation of this file. 1 #ifndef __BITTYBUZZMESSAGEHANDLER_H_
2 #define __BITTYBUZZMESSAGEHANDLER_H_
7 #include <cpp-common/ICircularQueue.h>
9 #include <pheromones/MessageDTO.h>
14 ICircularQueue<MessageDTO>& inputQueue,
15 ICircularQueue<MessageDTO>& hostQueue,
16 ICircularQueue<MessageDTO>& remoteQueue,
38 const FunctionListLengthRequestDTO& functionLengthRequest);
40 const FunctionDescriptionRequestDTO& functionDescRequest);
42 const FunctionCallRequestDTO& functionRequest);
55 #endif // __BITTYBUZZMESSAGEHANDLER_H_
bool handleResponse(const ResponseDTO &response)
Definition: BittyBuzzMessageHandler.cpp:221
ICircularQueue< MessageDTO > & m_remoteQueue
Definition: BittyBuzzMessageHandler.h:32
ResponseDTO handleRequest(const RequestDTO &request)
Definition: BittyBuzzMessageHandler.cpp:162
~BittyBuzzMessageHandler() override=default
A class to register buzz function/closures id and associate them with a string.
Definition: IBittyBuzzClosureRegister.h:24
static bool handleGenericResponse(const GenericResponseDTO &response)
Definition: BittyBuzzMessageHandler.cpp:184
ICircularQueue< MessageDTO > & m_inputQueue
Definition: BittyBuzzMessageHandler.h:30
bool handleVmMessage(const VmMessageDTO &vmMsg)
Definition: BittyBuzzMessageHandler.cpp:190
bool handleBuzzMessages(const BuzzMessagesDTO &msg)
Definition: BittyBuzzMessageHandler.cpp:201
FunctionCallResponseDTO handleFunctionCallRequest(const FunctionCallRequestDTO &functionRequest)
Definition: BittyBuzzMessageHandler.cpp:74
uint16_t messageQueueLength() const override
gets the number of message to be processed in the queue
Definition: BittyBuzzMessageHandler.cpp:42
static bool handleUserCallResponse(const UserCallResponseDTO &response)
Definition: BittyBuzzMessageHandler.cpp:178
bool processMessage() override
process a message and sends a response if needed. A response is sent to the appropriate queue on a re...
Definition: BittyBuzzMessageHandler.cpp:20
ILogger & m_logger
Definition: BittyBuzzMessageHandler.h:34
A logger class with basic logging capabilities.
Definition: ILogger.h:35
ICircularQueue< MessageDTO > & m_hostQueue
Definition: BittyBuzzMessageHandler.h:31
void clearMessages() override
clears all the pending messages in the input queue without processing them
Definition: BittyBuzzMessageHandler.cpp:40
FunctionListLengthResponseDTO handleFunctionListLengthRequest(const FunctionListLengthRequestDTO &functionLengthRequest)
Definition: BittyBuzzMessageHandler.cpp:44
Definition: BittyBuzzMessageHandler.h:11
BittyBuzzMessageHandler(const IBittyBuzzClosureRegister &closureRegister, ICircularQueue< MessageDTO > &inputQueue, ICircularQueue< MessageDTO > &hostQueue, ICircularQueue< MessageDTO > &remoteQueue, const IBSP &bsp, ILogger &logger)
Definition: BittyBuzzMessageHandler.cpp:7
const IBSP & m_bsp
Definition: BittyBuzzMessageHandler.h:33
UserCallResponseDTO handleUserCallRequest(const UserCallRequestDTO &userRequest)
Definition: BittyBuzzMessageHandler.cpp:135
FunctionDescriptionResponseDTO handleFunctionDescriptionRequest(const FunctionDescriptionRequestDTO &functionDescRequest)
Definition: BittyBuzzMessageHandler.cpp:50
Handles messages destined to the bbvm.
Definition: IBittyBuzzMessageHandler.h:8
const IBittyBuzzClosureRegister & m_closureRegister
Definition: BittyBuzzMessageHandler.h:29
bool handleMessage(const MessageDTO &message)
Definition: BittyBuzzMessageHandler.cpp:247