ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
message_handler Class Referenceabstract

Abstract interface for handling messages from a subsystem. More...

#include <message_handler.hpp>

Inheritance diagram for message_handler:
Inheritance graph
Collaboration diagram for message_handler:
Collaboration graph

Public Member Functions

virtual boost::asio::awaitable< std::expected< std::vector< std::byte >, error_code > > handle_message (message_type type, std::span< const std::byte > payload, const std::string &remote_address)=0
 Handle a message and produce a response payload.
 

Detailed Description

Abstract interface for handling messages from a subsystem.

Subsystems implement this interface to process their domain-specific messages. The handler is responsible for:

Member Function Documentation

◆ handle_message()

virtual boost::asio::awaitable< std::expected< std::vector< std::byte >, error_code > > handle_message ( message_type  type,
std::span< const std::byte >  payload,
const std::string &  remote_address 
)
pure virtual

Handle a message and produce a response payload.

Parameters
typeThe message type being processed
payloadThe raw message payload to deserialize and process
remote_addressThe remote endpoint address (IP:port) of the client connection
Returns
Expected containing response payload bytes, or error_code on failure

Implemented in accounts_message_handler, risk_message_handler, variability_message_handler, and subscription_handler.