Class SpawnProtocol.Spawn$

  • All Implemented Interfaces:
    java.io.Serializable, scala.Serializable
    Enclosing class:
    SpawnProtocol

    public static class SpawnProtocol.Spawn$
    extends java.lang.Object
    implements scala.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • MODULE$

        public static final SpawnProtocol.Spawn$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • Spawn$

        public Spawn$()
    • Method Detail

      • apply

        public <T> scala.Function1<ActorRef<ActorRef<T>>,​SpawnProtocol.Spawn<T>> apply​(Behavior<T> behavior,
                                                                                             java.lang.String name)
        Special factory to make using Spawn with ask easier. Props defaults to Props.empty
        Parameters:
        behavior - (undocumented)
        name - (undocumented)
        Returns:
        (undocumented)
      • apply

        public <T> SpawnProtocol.Spawn<T> apply​(Behavior<T> behavior,
                                                java.lang.String name,
                                                Props props,
                                                ActorRef<ActorRef<T>> replyTo)
        Spawn a child actor with the given behavior and send back the ActorRef of that child to the given replyTo destination.

        If name is an empty string an anonymous actor (with automatically generated name) will be created.

        If the name is already taken of an existing actor a unique name will be used by appending a suffix to the the name. The exact format or value of the suffix is an implementation detail that is undefined. This means that reusing the same name for several actors will not result in InvalidActorNameException, but it's better to use unique names to begin with.

        Parameters:
        behavior - (undocumented)
        name - (undocumented)
        props - (undocumented)
        replyTo - (undocumented)
        Returns:
        (undocumented)