|
SObjectizer
5.8
|
A class for the named local mbox. More...
#include <named_local_mbox.hpp>
Public Member Functions | |
| ~named_local_mbox_t () override | |
| mbox_id_t | id () const override |
| Unique ID of this mbox. | |
| void | subscribe_event_handler (const std::type_index &type_wrapper, abstract_message_sink_t &subscriber) override |
| Add the message handler. | |
| void | unsubscribe_event_handler (const std::type_index &type_wrapper, abstract_message_sink_t &subscriber) noexcept override |
| Remove all message handlers. | |
| std::string | query_name () const override |
| Get the mbox name. | |
| mbox_type_t | type () const override |
| Get the type of message box. | |
| void | do_deliver_message (message_delivery_mode_t delivery_mode, const std::type_index &msg_type, const message_ref_t &message, unsigned int redirection_deep) override |
| Deliver message for all subscribers with respect to message limits. | |
| void | set_delivery_filter (const std::type_index &msg_type, const delivery_filter_t &filter, abstract_message_sink_t &subscriber) override |
| Set a delivery filter for message type and subscriber. | |
| void | drop_delivery_filter (const std::type_index &msg_type, abstract_message_sink_t &subscriber) noexcept override |
| Removes delivery filter for message type and subscriber. | |
| environment_t & | environment () const noexcept override |
| SObjectizer Environment for which the mbox is created. | |
Private Member Functions | |
| named_local_mbox_t (full_named_mbox_id_t full_name, const mbox_t &mbox, impl::mbox_core_t &mbox_core) | |
Private Attributes | |
| const full_named_mbox_id_t | m_name |
| Mbox name. | |
| impl::mbox_core_ref_t | m_mbox_core |
| An utility for this mbox. | |
| mbox_t | m_mbox |
| Actual mbox. | |
Friends | |
| class | impl::mbox_core_t |
Additional Inherited Members | |
Protected Member Functions inherited from so_5::atomic_refcounted_t | |
| atomic_refcounted_t (const atomic_refcounted_t &)=delete | |
| atomic_refcounted_t & | operator= (const atomic_refcounted_t &)=delete |
| atomic_refcounted_t () noexcept | |
| Default constructor. | |
| ~atomic_refcounted_t () noexcept=default | |
| Destructor. | |
| void | inc_ref_count () noexcept |
| Increments reference count. | |
| unsigned long | dec_ref_count () noexcept |
| Decrement reference count. | |
A class for the named local mbox.
Definition at line 36 of file named_local_mbox.hpp.
|
private |
Definition at line 19 of file named_local_mbox.cpp.
|
override |
Definition at line 30 of file named_local_mbox.cpp.
|
overridevirtual |
Deliver message for all subscribers with respect to message limits.
A message delivery from timer thread is somewhat different from an ordinary message delivery. Especially in the case when target mbox is a message chain. If that message chain is full and some kind of overflow reaction is specified (like waiting for some time or throwing an exception) then it can lead to undesired behaviour of the whole application. To take care about these cases a new method is introduced.
| delivery_mode | Can the delivery blocks the current thread? |
| msg_type | Type of the message to deliver. |
| message | A message instance to be delivered. |
| redirection_deep | Current deep of overlimit reaction recursion. |
Implements so_5::abstract_message_box_t.
Definition at line 73 of file named_local_mbox.cpp.
|
overridevirtualnoexcept |
Removes delivery filter for message type and subscriber.
Implements so_5::abstract_message_box_t.
Definition at line 96 of file named_local_mbox.cpp.
|
overridevirtualnoexcept |
SObjectizer Environment for which the mbox is created.
Implements so_5::abstract_message_box_t.
Definition at line 104 of file named_local_mbox.cpp.
|
overridevirtual |
Unique ID of this mbox.
Implements so_5::abstract_message_box_t.
Definition at line 36 of file named_local_mbox.cpp.
|
overridevirtual |
Get the mbox name.
Implements so_5::abstract_message_box_t.
Definition at line 58 of file named_local_mbox.cpp.
|
overridevirtual |
Set a delivery filter for message type and subscriber.
| msg_type | Message type to be filtered. |
| filter | Filter to be set. A caller must guaranted the validity of this reference. |
| subscriber | A subscriber for the message. |
Implements so_5::abstract_message_box_t.
Definition at line 87 of file named_local_mbox.cpp.
|
overridevirtual |
Add the message handler.
| type_index | Message type. |
| subscriber | Subscriber. |
Implements so_5::abstract_message_box_t.
Definition at line 42 of file named_local_mbox.cpp.
|
overridevirtual |
Get the type of message box.
Implements so_5::abstract_message_box_t.
Definition at line 67 of file named_local_mbox.cpp.
|
overridevirtualnoexcept |
Remove all message handlers.
| type_index | Message type. |
| subscriber | Subscriber. |
Implements so_5::abstract_message_box_t.
Definition at line 50 of file named_local_mbox.cpp.
|
friend |
Definition at line 39 of file named_local_mbox.hpp.
|
private |
Actual mbox.
Definition at line 97 of file named_local_mbox.hpp.
|
private |
An utility for this mbox.
Definition at line 94 of file named_local_mbox.hpp.
|
private |
Mbox name.
Definition at line 91 of file named_local_mbox.hpp.