C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::event_based_scheduled_mail_t< Priority, Trait, Args > Class Template Reference

Provides a fluent interface for sending asynchronous messages to actors at a specific point in time. More...

#include <event_based_mail.hpp>

Inheritance diagram for caf::event_based_scheduled_mail_t< Priority, Trait, Args >:
caf::async_scheduled_mail_t< Priority, Trait, Args... >

Public Types

using super = async_scheduled_mail_t<Priority, Trait, Args...>
 

Public Member Functions

 event_based_scheduled_mail_t (abstract_scheduled_actor *self, message &&content, actor_clock::time_point timeout)
 
template<class Handle , class RefTag = strong_ref_t, class SelfRefTag = strong_self_ref_t>
auto request (const Handle &receiver, timespan relative_timeout, RefTag ref_tag={}, SelfRefTag self_ref_tag={}) &&
 Sends the message to receiver as a request message and returns a handle for processing the response.
 
- Public Member Functions inherited from caf::async_scheduled_mail_t< Priority, Trait, Args... >
 async_scheduled_mail_t (local_actor *self, message &&content, actor_clock::time_point timeout)
 
 async_scheduled_mail_t (const async_scheduled_mail_t &)=delete
 
async_scheduled_mail_toperator= (const async_scheduled_mail_t &)=delete
 
disposable send (const Handle &receiver, RefTag ref_tag={}, SelfRefTag self_ref_tag={}) &&
 Sends the message to receiver.
 
auto delegate (const Handle &receiver, RefTag ref_tag={}, SelfRefTag self_ref_tag={}) &&
 Sends the message to receiver, using the message ID and sender from the currently processed message.
 

Additional Inherited Members

- Protected Attributes inherited from caf::async_scheduled_mail_t< Priority, Trait, Args... >
local_actorself_
 
message content_
 
actor_clock::time_point timeout_
 

Detailed Description

template<message_priority Priority, class Trait, class... Args>
class caf::event_based_scheduled_mail_t< Priority, Trait, Args >

Provides a fluent interface for sending asynchronous messages to actors at a specific point in time.

Member Function Documentation

◆ request()

template<message_priority Priority, class Trait , class... Args>
template<class Handle , class RefTag = strong_ref_t, class SelfRefTag = strong_self_ref_t>
auto caf::event_based_scheduled_mail_t< Priority, Trait, Args >::request ( const Handle & receiver,
timespan relative_timeout,
RefTag ref_tag = {},
SelfRefTag self_ref_tag = {} ) &&
nodiscard

Sends the message to receiver as a request message and returns a handle for processing the response.

Parameters
receiverThe actor that should receive the message.
relative_timeoutThe maximum time to wait for a response.
ref_tagEither strong_ref or weak_ref. When passing strong_ref, the system will keep a strong reference to the receiver until the message has been delivered. Otherwise, the system will only keep a weak reference to the receiver and the message will be dropped if the receiver has been garbage collected in the meantime.
self_ref_tagEither strong_self_ref or weak_self_ref. When passing strong_self_ref, the system will keep a strong reference to the sender until the message has been delivered. Otherwise, the system will only keep a weak reference to the sender and the message will be dropped if the sender has been garbage collected in the meantime.

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