StreamActor<M, A> class

An Actor that has the ability to return a Stream, rather than only a single object, for each message it receives.

This can be used to for "push" communication, where an Actor is able to, from a different Isolate, send many messages back to the caller, which can listen to messages using the standard Stream API.

Inheritance

Constructors

StreamActor(Handler<M, Stream<A>> handler)
Creates a StreamActor that handles messages with the given Handler.
StreamActor.create(Handler<M, Stream<A>> createHandler())
Creates a StreamActor that handles messages with the Handler returned by createHandler.
StreamActor.of(HandlerFunction<M, Stream<A>> handler)
Creates a StreamActor based on a handler function.

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

close() FutureOr<void>
Close this Actor.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(M message) Stream<A>
Send a message to the Handler this StreamActor is based on.
override
toSendable() Future<Sendable<M, Stream<A>>>
A handle to this Actor which can be sent to other actors.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited