Nexus API Reference

StatefulActorHandler

Tags
psalm-api

Contract for stateful class-based actors.

Like ActorHandler but with explicit state management. The actor provides an initial state via initialState() and receives the current state on each handle() call. Returns BehaviorWithState to update state or stop.

template

T of object

template

S

Table of Contents

Methods

handle()  : BehaviorWithState<T, S>
Handle an incoming message with the current state.
initialState()  : S
Provide the initial state for this actor.

Methods

initialState()

Provide the initial state for this actor.

public initialState() : S
Return values
S

        
On this page

Search results