SObjectizer-5 Extra
|
A special envelope to perform time-limited delivery. More...
#include <time_limited_delivery.hpp>
Public Member Functions | |
time_limited_delivery_t (message_ref_t message, std::chrono::steady_clock::time_point deadline) | |
Initializing constructor. More... | |
time_limited_delivery_t (message_ref_t message, std::chrono::steady_clock::duration deadline) | |
Initializing constructor. More... | |
void | access_hook (access_context_t, handler_invoker_t &invoker) noexcept override |
Public Member Functions inherited from so_5::extra::enveloped_msg::just_envelope_t | |
just_envelope_t (so_5::message_ref_t payload) | |
Initializing constructor. More... | |
~just_envelope_t () noexcept override=default | |
just_envelope_t (const just_envelope_t &)=delete | |
just_envelope_t (just_envelope_t &&)=delete | |
void | access_hook (access_context_t, handler_invoker_t &invoker) noexcept override |
Private Attributes | |
const std::chrono::steady_clock::time_point | m_deadline |
Delivery deadline. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from so_5::extra::enveloped_msg::just_envelope_t | |
SO_5_NODISCARD payload_info_t | whole_payload () const noexcept |
Get access to content of envelope. More... | |
SO_5_NODISCARD message_ref_t & | payload () const noexcept |
Get access to payload only. More... | |
message_mutability_t | so5_message_mutability () const noexcept override |
void | so5_change_mutability (message_mutability_t new_value) override |
A special envelope to perform time-limited delivery.
This envelope checks the current time before processing/transformation of the enveloped message. If the current time is equal or greater than the specified deadline then message won't be processed/transformed.
Usage example:
Definition at line 53 of file time_limited_delivery.hpp.
|
inline |
Initializing constructor.
Receives wallclock time as deadline.
message | Message to be delivered. |
deadline | Delivery deadline. |
Definition at line 63 of file time_limited_delivery.hpp.
|
inline |
Initializing constructor.
Receives time interval. Deadline will be calculated automatically from the current time.
message | Message to be delivered. |
deadline | Time interval for calculation of deadline value. |
Definition at line 77 of file time_limited_delivery.hpp.
|
inlineoverridenoexcept |
Definition at line 89 of file time_limited_delivery.hpp.
|
private |
Delivery deadline.
Definition at line 56 of file time_limited_delivery.hpp.