Template for type-safe behavior implementations. More...
#include <actor.hpp>
Public Member Functions | |
void | Receive (TMessageId messageId, TBlob blob, TActorContext::TPtr ctx) override |
Process incoming message with automatic type dispatch. | |
Template for type-safe behavior implementations.
TBaseBehavior | The concrete behavior class that inherits from this template |
TMessages | List of message types this behavior can handle |
TBehavior provides automatic message deserialization and type-safe message handling. It supports both synchronous and asynchronous message handlers, automatically detecting the return type.
Usage example:
|
inlineoverridevirtual |
Process incoming message with automatic type dispatch.
messageId | Type identifier of the message |
blob | Serialized message data |
ctx | Actor context for communication |
This method automatically deserializes the message and calls the appropriate typed Receive method on the derived class.
Implements NNet::NActors::IBehavior.