COROIO: NNet::NActors::IActor Class Reference
COROIO
 
Loading...
Searching...
No Matches
NNet::NActors::IActor Class Referenceabstract

Base interface for all actors in the system. More...

#include <actor.hpp>

Inheritance diagram for NNet::NActors::IActor:
NNet::NActors::IBehaviorActor NNet::NActors::ICoroActor NNet::NActors::TAsk< T >

Public Types

using TPtr = std::unique_ptr< IActor >
 

Public Member Functions

virtual void Receive (TMessageId messageId, TBlob blob, TActorContext::TPtr ctx)=0
 Process an incoming message.
 

Friends

class TActorSystem
 

Detailed Description

Base interface for all actors in the system.

IActor defines the basic contract that all actors must implement. Actors receive messages through the Receive method and can respond by sending messages back through the provided context.

This is the synchronous version of actor interface - the Receive method should complete quickly and not block on I/O operations.

Member Function Documentation

◆ Receive()

virtual void NNet::NActors::IActor::Receive ( TMessageId  messageId,
TBlob  blob,
TActorContext::TPtr  ctx 
)
pure virtual

Process an incoming message.

Parameters
messageIdType identifier of the message
blobSerialized message data
ctxActor context for sending responses and accessing actor system

This method should process the message quickly and not perform blocking operations. For async operations, use ICoroActor instead.

Implemented in NNet::NActors::ICoroActor, NNet::NActors::IBehaviorActor, and NNet::NActors::TAsk< T >.


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