DelegateMQ
Loading...
Searching...
No Matches
TransportMonitor Class Reference

Monitors remote delegate send message timeouts. Class is thread safe. Call TransportMonitor::Process() periodically for timeout handling. Depending on the transport implementation, the message might still be delivered event if the monitor SendStatusCb callback is invoked. A timeout expiring just means that an ack was not received within the time specified. More...

#include <TransportMonitor.h>

Inheritance diagram for TransportMonitor:
ITransportMonitor

Public Types

enum class  Status { SUCCESS , TIMEOUT }
 

Public Member Functions

 TransportMonitor (const dmq::Duration timeout)
 
 ~TransportMonitor ()
 
void Add (uint16_t seqNum, dmq::DelegateRemoteId remoteId)
 
void Remove (uint16_t seqNum)
 
void Process ()
 Call periodically to process message timeouts.
 
- Public Member Functions inherited from ITransportMonitor

Public Attributes

dmq::MulticastDelegateSafe< void(dmq::DelegateRemoteId id, uint16_t seqNum, Status status)> SendStatusCb
 

Detailed Description

Monitors remote delegate send message timeouts. Class is thread safe. Call TransportMonitor::Process() periodically for timeout handling. Depending on the transport implementation, the message might still be delivered event if the monitor SendStatusCb callback is invoked. A timeout expiring just means that an ack was not received within the time specified.

Member Enumeration Documentation

◆ Status

enum class TransportMonitor::Status
strong
Enumerator
SUCCESS 
TIMEOUT 

Constructor & Destructor Documentation

◆ TransportMonitor()

TransportMonitor::TransportMonitor ( const dmq::Duration timeout)
inline

◆ ~TransportMonitor()

TransportMonitor::~TransportMonitor ( )
inline

Member Function Documentation

◆ Add()

void TransportMonitor::Add ( uint16_t seqNum,
dmq::DelegateRemoteId remoteId )
inlinevirtual

Add a sequence number param[in] seqNum - the delegate message sequence number param[in] remoteId - the remote ID

Implements ITransportMonitor.

◆ Process()

void TransportMonitor::Process ( )
inline

Call periodically to process message timeouts.

◆ Remove()

void TransportMonitor::Remove ( uint16_t seqNum)
inlinevirtual

Remove a sequence number. Invokes SendStatusCb callback to notify registered client of removal. param[in] seqNum - the delegate message sequence number

Implements ITransportMonitor.

Member Data Documentation

◆ SendStatusCb

dmq::MulticastDelegateSafe<void(dmq::DelegateRemoteId id, uint16_t seqNum, Status status)> TransportMonitor::SendStatusCb

The documentation for this class was generated from the following file: