Base class for rotor
handler, i.e concrete message type processing point on concrete actor.
More...
#include <handler.h>
Public Member Functions | |
handler_base_t (actor_base_t &actor, const void *handler_type_) noexcept | |
constructs handler_base_t from raw pointer to actor, raw pointer to message type and raw pointer to handler type | |
bool | operator== (const handler_base_t &rhs) const noexcept |
compare two handler for equality | |
virtual void | call (message_ptr_t &) noexcept=0 |
attempt to delivery message to the handler | |
virtual handler_ptr_t | upgrade (const void *tag) noexcept |
"upgrades" handler by tagging it | |
virtual bool | select (message_ptr_t &) noexcept=0 |
returns true if the message can be handled by the handler | |
virtual void | call_no_check (message_ptr_t &) noexcept=0 |
unconditionally invokes the handler for the message | |
virtual const void * | message_type () const noexcept=0 |
unique per-message-type pointer used for routing | |
Public Attributes | |
const void * | handler_type |
pointer to unique handler type ( typeid(Handler).name() ) | |
actor_base_t * | actor_ptr |
non-null pointer to actor_base_t the actor of the handler, | |
size_t | precalc_hash |
precalculated hash for the handler | |
Base class for rotor
handler, i.e concrete message type processing point on concrete actor.
It holds reference to actor_base_t
.
|
pure virtualnoexcept |
attempt to delivery message to the handler
The message is delivered only if its type matches to the handler message type, otherwise it is silently ignored
Implemented in rotor::handler_intercepted_t, rotor::handler_t< Handler, std::enable_if_t< details::is_actor_handler_v< Handler > > >, rotor::handler_t< Handler, std::enable_if_t< details::is_plugin_handler_v< Handler > > >, and rotor::handler_t< lambda_holder_t< Handler, M >, std::enable_if_t< details::is_lambda_handler_v< lambda_holder_t< Handler, M > > > >.
|
pure virtualnoexcept |
unconditionally invokes the handler for the message
It assumes that the handler is able to handle the message. See select
method.
Implemented in rotor::handler_intercepted_t, rotor::handler_t< Handler, std::enable_if_t< details::is_actor_handler_v< Handler > > >, rotor::handler_t< Handler, std::enable_if_t< details::is_plugin_handler_v< Handler > > >, and rotor::handler_t< lambda_holder_t< Handler, M >, std::enable_if_t< details::is_lambda_handler_v< lambda_holder_t< Handler, M > > > >.
|
pure virtualnoexcept |
unique per-message-type pointer used for routing
Implemented in rotor::handler_intercepted_t, rotor::handler_t< Handler, std::enable_if_t< details::is_actor_handler_v< Handler > > >, rotor::handler_t< Handler, std::enable_if_t< details::is_plugin_handler_v< Handler > > >, and rotor::handler_t< lambda_holder_t< Handler, M >, std::enable_if_t< details::is_lambda_handler_v< lambda_holder_t< Handler, M > > > >.
|
pure virtualnoexcept |
returns true
if the message can be handled by the handler
Implemented in rotor::handler_intercepted_t, rotor::handler_t< Handler, std::enable_if_t< details::is_actor_handler_v< Handler > > >, rotor::handler_t< Handler, std::enable_if_t< details::is_plugin_handler_v< Handler > > >, and rotor::handler_t< lambda_holder_t< Handler, M >, std::enable_if_t< details::is_lambda_handler_v< lambda_holder_t< Handler, M > > > >.
|
virtualnoexcept |
"upgrades" handler by tagging it
Conceptually it intercepts handler call and does tag-specific actions
Reimplemented in rotor::handler_intercepted_t.