akka.pattern
Class PromiseActorRef

java.lang.Object
  extended by akka.actor.ActorRef
      extended by akka.actor.InternalActorRef
          extended by akka.pattern.PromiseActorRef
All Implemented Interfaces:
ActorRefScope, LocalRef, MinimalActorRef, ScalaActorRef, java.io.Serializable, java.lang.Comparable<ActorRef>

public final class PromiseActorRef
extends InternalActorRef
implements MinimalActorRef

Akka private optimized representation of the temporary actor spawned to receive the reply to an "ask" operation.

INTERNAL API

See Also:
Serialized Form

Method Summary
static PromiseActorRef apply(ActorRefProvider provider, Timeout timeout, java.lang.String targetName)
           
 InternalActorRef getParent()
          Obtain parent of this ref; used by getChild for ".." paths.
 scala.concurrent.ExecutionContext internalCallingThreadExecutionContext()
           
 boolean isTerminated()
          Returns &ldquo;true&rdquo; if the actor is locally known to be terminated, &ldquo;false&rdquo; if alive or uncertain.
 ActorPath path()
          Contract of this method: Must always return the same ActorPath, which must have been registered if we haven't been stopped yet.
 ActorRefProvider provider()
          Get a reference to the actor ref provider which created this ref.
 scala.concurrent.Promise<java.lang.Object> result()
           
 void sendSystemMessage(SystemMessage message)
           
 void stop()
           
 
Methods inherited from class akka.actor.InternalActorRef
getChild, isLocal, restart, resume, start, suspend
 
Methods inherited from class akka.actor.ActorRef
compareTo, equals, forward, hashCode, noSender, tell, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface akka.actor.MinimalActorRef
getChild, restart, resume, start, suspend, writeReplace
 
Methods inherited from interface akka.actor.LocalRef
isLocal
 

Method Detail

apply

public static PromiseActorRef apply(ActorRefProvider provider,
                                    Timeout timeout,
                                    java.lang.String targetName)

provider

public ActorRefProvider provider()
Description copied from class: InternalActorRef
Get a reference to the actor ref provider which created this ref.

Specified by:
provider in class InternalActorRef
Returns:
(undocumented)

result

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

getParent

public InternalActorRef getParent()
Description copied from class: InternalActorRef
Obtain parent of this ref; used by getChild for ".." paths.

Specified by:
getParent in interface MinimalActorRef
Specified by:
getParent in class InternalActorRef
Returns:
(undocumented)

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)

sendSystemMessage

public void sendSystemMessage(SystemMessage message)
Specified by:
sendSystemMessage in interface MinimalActorRef
Specified by:
sendSystemMessage in class InternalActorRef

isTerminated

public boolean isTerminated()
Description copied from class: InternalActorRef
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)

stop

public void stop()
Specified by:
stop in interface MinimalActorRef
Specified by:
stop in class InternalActorRef