|
ORE Studio 0.0.4
|
Message handler for subscription protocol messages. More...
#include <subscription_handler.hpp>


Public Member Functions | |
| subscription_handler (std::shared_ptr< subscription_manager > manager, std::shared_ptr< eventing::service::event_channel_registry > registry) | |
| Construct a subscription handler. | |
| boost::asio::awaitable< std::expected< std::vector< std::byte >, ores::utility::serialization::error_code > > | handle_message (messaging::message_type type, std::span< const std::byte > payload, const std::string &remote_address) override |
| Handle a subscription protocol message. | |
Message handler for subscription protocol messages.
Handles subscribe_request, unsubscribe_request, and list_event_channels_request messages from clients, delegating to the subscription_manager to track subscriptions and the event_channel_registry for channel discovery.
Note: notification messages are server-initiated and are sent via the subscription_manager's notify() method, not through this handler.
| subscription_handler | ( | std::shared_ptr< subscription_manager > | manager, |
| std::shared_ptr< eventing::service::event_channel_registry > | registry | ||
| ) |
Construct a subscription handler.
| manager | Shared subscription manager for tracking subscriptions. |
| registry | Shared event channel registry for channel discovery. |
|
overridevirtual |
Handle a subscription protocol message.
| type | The message type (subscribe_request or unsubscribe_request). |
| payload | The message payload. |
| remote_address | The remote endpoint address of the client. |
Implements message_handler.