rotor
Event loop friendly C++ actor micro-framework
 
Loading...
Searching...
No Matches
rotor::plugin::delivery_plugin_t< LocalDelivery > Struct Template Reference

templated message delivery plugin, to allow local message delivery be customized More...

#include <delivery.h>

Inheritance diagram for rotor::plugin::delivery_plugin_t< LocalDelivery >:
rotor::plugin::delivery_plugin_base_t rotor::plugin::plugin_base_t

Public Member Functions

const std::type_index & identity () const noexcept override
 returns pointer, which uniquely identifiess plugin type
 
size_t process () noexcept override
 main messages dispatcher interface
 
size_t process () noexcept
 main messages dispatcher interface
 
size_t process () noexcept
 main messages dispatcher interface
 
- Public Member Functions inherited from rotor::plugin::delivery_plugin_base_t
void activate (actor_base_t *actor) noexcept override
 invoked by actor upon initialization.
 
 plugin_base_t ()=default
 default plugin ctor
 
 plugin_base_t (const plugin_base_t &)=delete
 copy ctor is not allowed
 
- Public Member Functions inherited from rotor::plugin::plugin_base_t
 plugin_base_t ()=default
 default plugin ctor
 
 plugin_base_t (const plugin_base_t &)=delete
 copy ctor is not allowed
 
virtual void deactivate () noexcept
 deactivates plugin from an actor
 
virtual bool handle_init (message::init_request_t *message) noexcept
 polls plugin, whether it is done with initialization
 
virtual bool handle_shutdown (message::shutdown_request_t *message) noexcept
 polls plugin, whether it is done with shutdown
 
virtual void handle_start (message::start_trigger_t *message) noexcept
 polls plugin, whether it is done with start
 
virtual bool handle_subscription (message::subscription_t &message) noexcept
 polls plugin, whether it is done with subscription
 
virtual bool handle_unsubscription (const subscription_point_t &point, bool external) noexcept
 polls plugin, whether it is done with unsubscription
 
virtual bool forget_subscription (const subscription_point_t &point) noexcept
 remove subscription point from internal storage
 
virtual void forget_subscription (const subscription_info_ptr_t &info) noexcept
 commits unsubscription via supervisor
 
template<typename Plugin , typename Fn >
void with_casted (Fn &&fn, config_phase_t desired_phase=config_phase_t::INITIALIZING) noexcept
 invokes the callback if plugin type and phase mach
 
reaction_underlying_t get_reaction () const noexcept
 returns the current set of plugin reactions
 
void reaction_on (reaction_t value) noexcept
 turns on the specified reaction of the plugin
 
void reaction_off (reaction_t value) noexcept
 turns off the specified reaction of the plugin
 
template<typename T >
auto & access () noexcept
 generic non-public fields accessor
 

Static Public Attributes

static const std::type_index class_identity = typeid(local_delivery_t)
 
- Static Public Attributes inherited from rotor::plugin::plugin_base_t
static constexpr reaction_underlying_t REACTION_MASK = 0b00001111
 the bit mask for all reactions enabled
 

Additional Inherited Members

- Public Types inherited from rotor::plugin::plugin_base_t
enum  reaction_t : unsigned { INIT = 0b00000001 , SHUTDOWN = 0b00000010 , SUBSCRIPTION = 0b00000100 , START = 0b00001000 }
 possible plugin's reactions on actor lifetime events
 
using reaction_underlying_t = std::underlying_type_t< reaction_t >
 the underlying type of reaction_t
 
- Protected Member Functions inherited from rotor::plugin::plugin_base_t
template<typename Handler >
subscription_info_ptr_t subscribe (Handler &&handler, const address_ptr_t &address) noexcept
 subscribes plugin to the custom plugin handler on the specified address
 
template<typename Handler >
subscription_info_ptr_t subscribe (Handler &&handler) noexcept
 subscribes plugin to the custom plugin handler on the main actor address
 
extended_error_ptr_t make_error (const std::error_code &ec, const extended_error_ptr_t &next={}, const message_ptr_t &request={}) noexcept
 makes an error within the context of actor
 
- Protected Attributes inherited from rotor::plugin::delivery_plugin_base_t
messages_queue_tqueue = nullptr
 non-owning raw pointer of supervisor's messages queue
 
address_taddress = nullptr
 non-owning raw pointer to supervisor's main address
 
subscription_tsubscription_map
 non-owning raw pointer to supervisor's subscriptions map
 
const message_stringifier_tstringifier
 non-owning raw pointer to system's stringifier
 
- Protected Attributes inherited from rotor::plugin::plugin_base_t
actor_base_tactor
 non-owning actor pointer
 

Detailed Description

template<typename LocalDelivery = local_delivery_t>
struct rotor::plugin::delivery_plugin_t< LocalDelivery >

templated message delivery plugin, to allow local message delivery be customized

Member Function Documentation

◆ identity()

template<typename LocalDelivery = local_delivery_t>
const std::type_index & rotor::plugin::delivery_plugin_t< LocalDelivery >::identity ( ) const
inlineoverridevirtualnoexcept

returns pointer, which uniquely identifiess plugin type

Implements rotor::plugin::plugin_base_t.

◆ process() [1/3]

size_t rotor::plugin::delivery_plugin_t< plugin::local_delivery_t >::process ( )
inlinevirtualnoexcept

main messages dispatcher interface

Implements rotor::plugin::delivery_plugin_base_t.

◆ process() [2/3]

size_t rotor::plugin::delivery_plugin_t< plugin::inspected_local_delivery_t >::process ( )
inlinevirtualnoexcept

main messages dispatcher interface

Implements rotor::plugin::delivery_plugin_base_t.

◆ process() [3/3]

template<typename LocalDelivery = local_delivery_t>
size_t rotor::plugin::delivery_plugin_t< LocalDelivery >::process ( )
inlineoverridevirtualnoexcept

main messages dispatcher interface

Implements rotor::plugin::delivery_plugin_base_t.

Member Data Documentation

◆ class_identity

template<typename LocalDelivery >
const std::type_index rotor::plugin::delivery_plugin_t< LocalDelivery >::class_identity = typeid(local_delivery_t)
static

The plugin unique identity to allow further static_cast'ing


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