public class SpawnProtocol$ extends java.lang.ObjectA message protocol for actors that support spawning a child actor when receiving a
SpawnProtocol#Spawnmessage and sending back the
ActorRefof the child actor. Create instances through the
The typical usage of this is to use it as the guardian actor of the
ActorSystem, possibly combined with
Behaviors.setupto starts some initial tasks or actors. Child actors can then be started from the outside by telling or asking
SpawnProtocol#Spawnto the actor reference of the system. When using
askthis is similar to how
ActorRefFactory.actorOf(akka.actor.Props)can be used in classic actors with the difference that a
Stopping children is done through specific support in the protocol of the children, or stopping the entire spawn protocol actor.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
apply()Scala API: returns a behavior that can be commanded to spawn arbitrary children.
create()Java API: returns a behavior that can be commanded to spawn arbitrary children.
public static final SpawnProtocol$ MODULE$Static reference to the singleton instance of this Scala object.