Class SubscriptionHandler
Defined in File subscription_handler.hpp
Inheritance Relationships
Base Types
public email::EmailHandler
(Class EmailHandler)public std::enable_shared_from_this< SubscriptionHandler >
Class Documentation
-
class SubscriptionHandler : public email::EmailHandler, public std::enable_shared_from_this<SubscriptionHandler>
Email handler for subscriptions.
Distributes new messages to the right subscription(s).
Public Types
-
using MessageQueue = SafeQueue<std::pair<std::string, MessageInfo>>
Public Functions
-
SubscriptionHandler()
Constructor.
-
virtual ~SubscriptionHandler()
-
void register_subscription(const std::string &topic_name, MessageQueue::WeakPtr message_queue)
Register a subscription with the handler.
New messages will be added to the subscription’s queue if the topic name matches.
- Parameters:
topic_name – the topic name
message_queue – the subscription’s message queue to push the new message to
Register this handler.
Registers this handler with the
PollingManager
so that it is called with new emails. To be called after creation.- Parameters:
polling_manager – the polling manager to register with
-
using MessageQueue = SafeQueue<std::pair<std::string, MessageInfo>>