ActorBuilder class
A builder for creating an actor that can handle different types of messages.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isEqual<
T> (T message, FutureOr< void> actor(ActorContext context, T message)) → ActorBuilder -
Handle a message if the message is equal to the given
messageparameter. -
isInit(
Actor actor) → ActorBuilder -
Handle a message if it is an
initMsg. -
isShutdown(
Actor actor) → ActorBuilder -
Handle a message if it is an
shutdownMsg. -
isTrue(
bool predicate(Object? message), Actor actor) → ActorBuilder -
Handle a message if the given
predicatereturnstrue. -
isType<
T> (FutureOr< void> actor(ActorContext ctx, T msg)) → ActorBuilder -
Handle a message if the message is of type
T. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orActor(
Actor actor) → Actor -
Creates the actor. If no condition is met, the message is delegated to the given
actor. -
orSkip(
) → Actor - Creates the actor. If no condition is met, the message is skipped.
-
orThrow(
[Object exception()?]) → Actor - Creates the actor. If no condition is met, an exception is thrown.
-
toString(
) → String -
A string representation of this object.
inherited
-
withProtocolController(
ProtocolController controller) → ActorBuilder -
Register a protocol controller to handle a sequence of messages. See
ProcolControllerfor more details.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited