A message protocol for actors that support spawning a child actor when receiving a SpawnProtocol#Spawn
message and sending back the ActorRef of the child actor. An implementation of a behavior for this
protocol is defined in SpawnProtocol#behavior. That can be used as is or composed with other behavior
using Behavior#orElse.
The typical usage of this is to use it as the guardian actor of the ActorSystem, possibly combined with
Behaviors.setup to starts some initial tasks or actors. Child actors can then be started from the outside
by telling or asking SpawnProtocol#Spawn to the actor reference of the system. When using ask this is
similar to how akka.actor.ActorSystem#actorOf can be used in untyped actors with the difference that
a Future / CompletionStage of the ActorRef is returned.
A message protocol for actors that support spawning a child actor when receiving a SpawnProtocol#Spawn message and sending back the ActorRef of the child actor. An implementation of a behavior for this protocol is defined in SpawnProtocol#behavior. That can be used as is or composed with other behavior using Behavior#orElse.
The typical usage of this is to use it as the guardian actor of the ActorSystem, possibly combined with
Behaviors.setup
to starts some initial tasks or actors. Child actors can then be started from the outside by telling or asking SpawnProtocol#Spawn to the actor reference of the system. When usingask
this is similar to how akka.actor.ActorSystem#actorOf can be used in untyped actors with the difference that aFuture
/CompletionStage
of theActorRef
is returned.