Class TypedActor


  • public class TypedActor
    extends java.lang.Object
    Deprecated.
    Use 'org.apache.pekko.actor.typed' API. Since Akka 2.6.0.
    This represents the TypedActor Pekko Extension, access to the functionality is done through a given ActorSystem.
    • Constructor Detail

      • TypedActor

        public TypedActor()
        Deprecated.
    • Method Detail

      • lookup

        public static TypedActor$ lookup()
        Deprecated.
      • apply

        public static TypedActorFactory apply​(ActorContext context)
        Deprecated.
        Use 'org.apache.pekko.actor.typed' API. Since Akka 2.6.0.
        Returns a contextual TypedActorFactory of this extension, this means that any TypedActors created by this TypedActorExtension will be children to the specified context, this allows for creating hierarchies of TypedActors. Do _not_ let this instance escape the TypedActor since that will not be thread-safe.
      • get

        public static TypedActorFactory get​(ActorContext context)
        Deprecated.
        Returns a contextual TypedActorFactory of this extension, this means that any TypedActors created by this TypedActorExtension will be children to the specified context, this allows for creating hierarchies of TypedActors. Do _not_ let this instance escape the TypedActor since that will not be thread-safe.

        Java API

      • self

        public static <T> T self()
        Deprecated.
        Returns the reference to the proxy when called inside a method call in a TypedActor

        Example:

        class FooImpl extends Foo { def doFoo { val myself = TypedActor.self[Foo] } }

        Useful when you want to send a reference to this TypedActor to someone else.

        NEVER EXPOSE "this" to someone else, always use "self[TypeOfInterface(s)]"

        Throws IllegalStateException if called outside of the scope of a method on this TypedActor.

        Throws ClassCastException if the supplied type T isn't the type of the proxy associated with this TypedActor.

      • context

        public static ActorContext context()
        Deprecated.
        Returns the ActorContext (for a TypedActor) when inside a method call in a TypedActor.
      • dispatcher

        public static scala.concurrent.ExecutionContextExecutor dispatcher()
        Deprecated.
        Returns the default dispatcher (for a TypedActor) when inside a method call in a TypedActor.
      • hashCode

        public static final int hashCode()
        Deprecated.
      • equals

        public static final boolean equals​(java.lang.Object other)
        Deprecated.