Package akka.pattern

Class PromiseActorRef

  • All Implemented Interfaces:
    ActorRefScope, LocalRef, MinimalActorRef, ScalaActorRef, java.io.Serializable, java.lang.Comparable<ActorRef>, scala.Serializable

    public final class PromiseActorRef
    extends InternalActorRef
    implements MinimalActorRef
    As an optimization for the common (local) case we only register this PromiseActorRef with the provider when the path member is actually queried, which happens during serialization (but also during a simple call to toString, equals or hashCode!).

    Defined states: null => started, path not yet created Registering => currently creating temp path and registering it path: ActorPath => path is available and was registered StoppedWithPath(path) => stopped, path available Stopped => stopped, path not yet created

    See Also:
    Serialized Form
    • Constructor Detail

      • PromiseActorRef

        public PromiseActorRef()
    • Method Detail

      • apply

        public static PromiseActorRef apply​(ActorRefProvider provider,
                                            Timeout timeout,
                                            java.lang.Object targetName,
                                            java.lang.String messageClassName,
                                            ActorRef sender,
                                            scala.Function1<java.lang.String,​java.lang.Throwable> onTimeout)
      • apply$default$5

        public static ActorRef apply$default$5()
      • apply$default$6

        public static scala.Function1<java.lang.String,​java.lang.Throwable> apply$default$6()
      • result

        public scala.concurrent.Promise<java.lang.Object> result()
      • messageClassName

        public java.lang.String messageClassName()
      • messageClassName_$eq

        public void messageClassName_$eq​(java.lang.String x$1)
      • internalCallingThreadExecutionContext

        public scala.concurrent.ExecutionContext internalCallingThreadExecutionContext()
      • path

        public ActorPath path()
        Contract of this method: Must always return the same ActorPath, which must have been registered if we haven't been stopped yet.
        Specified by:
        path in class ActorRef
        Returns:
        (undocumented)
      • isTerminated

        public boolean isTerminated()
        Deprecated.
        Use context.watch(actor) and receive Terminated(actor). Since 2.2.
        Description copied from class: InternalActorRef
        INTERNAL API: Returns &ldquo;true&rdquo; if the actor is locally known to be terminated, &ldquo;false&rdquo; if alive or uncertain.
        Specified by:
        isTerminated in interface MinimalActorRef
        Specified by:
        isTerminated in class InternalActorRef
        Returns:
        (undocumented)