NAT mechanism for rotor More...
#include <address_mapping.h>
Public Member Functions | |
| void | set (actor_base_t &actor, const subscription_info_ptr_t &info) noexcept |
| associates temporal destination point with actor's message type | |
| address_ptr_t | get_mapped_address (actor_base_t &actor, const void *) noexcept |
| returns temporal destination address for the actor/message type | |
| template<typename Fn> | |
| void | each_subscription (const actor_base_t &actor, Fn &&fn) const noexcept |
| iterates on all subscriptions for an actor | |
| bool | has_subscriptions (const actor_base_t &actor) const noexcept |
| checks whether an actor has any subscriptions | |
| bool | empty () const noexcept |
| returns true if there is no any subscription for any actor | |
| void | remove (const subscription_point_t &point) noexcept |
| forgets subscription point | |
NAT mechanism for rotor
It plays the similar role as https://en.wikipedia.org/wiki/Network_address_translation in routers, i.e. the original message (request) is dispatched from different address then source actor. It's needed for supervising it.
The address_mapping_t does not hold the original reply address. That kind of mapping is done on per-request basis. The address_mapping_t performs only per-message-type mapping.
|
noexcept |
associates temporal destination point with actor's message type
An actor is able to process message type identified by message. So, the temporal subscription point (handler and temporal address) will be associated with the actor/message type pair.
In the routing the temporal destination address is usually some supervisor's address.