Class Adapter$


  • public class Adapter$
    extends java.lang.Object
    Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
    • Field Detail

      • MODULE$

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

      • Adapter$

        public Adapter$()
    • Method Detail

      • spawnAnonymous

        public <T> ActorRef<T> spawnAnonymous​(ActorSystem sys,
                                              Behavior<T> behavior,
                                              Props props)
        Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        sys - (undocumented)
        behavior - (undocumented)
        props - (undocumented)
        Returns:
        (undocumented)
      • spawn

        public <T> ActorRef<T> spawn​(ActorSystem sys,
                                     Behavior<T> behavior,
                                     java.lang.String name)
        Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        sys - (undocumented)
        behavior - (undocumented)
        name - (undocumented)
        Returns:
        (undocumented)
      • spawn

        public <T> ActorRef<T> spawn​(ActorSystem sys,
                                     Behavior<T> behavior,
                                     java.lang.String name,
                                     Props props)
        Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        sys - (undocumented)
        behavior - (undocumented)
        name - (undocumented)
        props - (undocumented)
        Returns:
        (undocumented)
      • spawnAnonymous

        public <T> ActorRef<T> spawnAnonymous​(ActorContext ctx,
                                              Behavior<T> behavior)
        Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        ctx - (undocumented)
        behavior - (undocumented)
        Returns:
        (undocumented)
      • spawnAnonymous

        public <T> ActorRef<T> spawnAnonymous​(ActorContext ctx,
                                              Behavior<T> behavior,
                                              Props props)
        Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        ctx - (undocumented)
        behavior - (undocumented)
        props - (undocumented)
        Returns:
        (undocumented)
      • spawn

        public <T> ActorRef<T> spawn​(ActorContext ctx,
                                     Behavior<T> behavior,
                                     java.lang.String name)
        Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        ctx - (undocumented)
        behavior - (undocumented)
        name - (undocumented)
        Returns:
        (undocumented)
      • spawn

        public <T> ActorRef<T> spawn​(ActorContext ctx,
                                     Behavior<T> behavior,
                                     java.lang.String name,
                                     Props props)
        Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with Behaviors.supervise.
        Parameters:
        ctx - (undocumented)
        behavior - (undocumented)
        name - (undocumented)
        props - (undocumented)
        Returns:
        (undocumented)
      • toUntyped

        public ActorSystem toUntyped​(ActorSystem<?> sys)
        Deprecated.
        Use 'toClassic' instead. Since 2.5.26.
      • toUntyped

        public ActorRef toUntyped​(ActorRef<?> ref)
        Deprecated.
        Use 'toClassic' instead. Since 2.5.26.
      • props

        public <T> Props props​(Creator<Behavior<T>> behavior,
                               Props deploy)
        Wrap Behavior in an untyped Props, i.e. when spawning a typed child actor from an untyped parent actor. This is normally not needed because you can use the extension methods spawn and spawnAnonymous with an untyped ActorContext, but it's needed when using typed actors with an existing library/tool that provides an API that takes an untyped Props parameter. Cluster Sharding is an example of that.
        Parameters:
        behavior - (undocumented)
        deploy - (undocumented)
        Returns:
        (undocumented)
      • props

        public <T> Props props​(Creator<Behavior<T>> behavior)
        Wrap Behavior in an untyped Props, i.e. when spawning a typed child actor from an untyped parent actor. This is normally not needed because you can use the extension methods spawn and spawnAnonymous with an untyped ActorContext, but it's needed when using typed actors with an existing library/tool that provides an API that takes an untyped Props parameter. Cluster Sharding is an example of that.
        Parameters:
        behavior - (undocumented)
        Returns:
        (undocumented)