ActorSystem class

An ActorSystem is a collection of actors, the can communicate with each other. An actor can only create or lookup actors in the same ActorSystem.

Inheritance

Constructors

ActorSystem({String name = localSystem, int defaultMailboxSize = 1000, MissingHostHandling missingHostHandling = MissingHostHandling.asLocal})
Creates a new ActorSystem.

Properties

actorPaths List<Uri>
The paths of all actors in this system.
no setter
externalCreateActor CreateActor?
Sets the external create create function. This function is used to create actors outside of the current ActorSystem.
no getter
externalLookupActor LookupActor?
Sets the external lookup actor function. This function is used to lookup an actor outside of the current ActorSystem.
no getter
externalLookupActors ← LookupActors?
Sets the external lookup actors function. This function is used to lookup a actors outside of the current ActorSystem.
no getter
hashCode int
The hash code for this object.
no setterinherited
metrics ActorSystemMetrics
The metrics for this actor system.
no setter
onActorAdded ← OnActorAdded?
Sets a callback function that is called when an actor is added to the system.
no getter
onActorRemoved ← OnActorRemoved?
Sets a callback function that is called when an actor is removed from the system.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addActorFactory(PathMatcher pathMatcher, ActorFactory factory) → void
Adds a global actor factory for the actor system. A global factory is used to create a new actor if the caller of BaseContext.createActor provides no factory. The first factory (in order they were added) where the matcher returns true is called to create the actor. If no matcher matches, an exception is thrown.
createActor(Uri path, {ActorFactory? factory, int? mailboxSize, bool sendInit = false}) Future<ActorRef>
Creates an actor at the given path.
inherited
lookupActor(Uri path) Future<ActorRef?>
Looks up an actor reference using the given path. If no actor exists for that path, null is returned.
inherited
lookupActors(Uri path) Future<List<ActorRef>>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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