actor_system_helper library

Classes

ActorBuilder
A builder for creating an actor that can handle different types of messages.
Protocol
A protocol is a sequence of steps.
ProtocolController
A controller to run protocols. It helps you to handle a sequence of messages that are part of a protocol.

Typedefs

ProtocolInit = FutureOr<void> Function(ActorContext ctx, String correlationId)
A function to execute the initial step of a protocol. Usually, a message is sent to another actor. It is important to pass the correlationId to the message so that the response can be correlated to the initial message.
ProtocolOnMessage<M> = FutureOr<bool> Function(ActorContext ctx, M msg)
A function to execute the next step of a protocol. The function should return true if the protocol is complete.

Exceptions / Errors

MessageNotHandledException