Package akka.pattern
Class PromiseActorRef
- java.lang.Object
-
- akka.actor.ActorRef
-
- akka.actor.InternalActorRef
-
- akka.pattern.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 thepathmember is actually queried, which happens during serialization (but also during a simple call totoString,equalsorhashCode!).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 Summary
Constructors Constructor Description PromiseActorRef()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void$bang(java.lang.Object message, ActorRef sender)ActorRef$bang$default$2(java.lang.Object message)static PromiseActorRefapply(ActorRefProvider provider, Timeout timeout, java.lang.Object targetName, java.lang.String messageClassName, ActorRef sender, scala.Function1<java.lang.String,java.lang.Throwable> onTimeout)static ActorRefapply$default$5()static scala.Function1<java.lang.String,java.lang.Throwable>apply$default$6()scala.concurrent.Future<java.lang.Object>ask(ActorRef actorRef, java.lang.Object message, Timeout timeout)scala.concurrent.Future<java.lang.Object>ask(ActorSelection actorSel, java.lang.Object message, Timeout timeout)InternalActorRefgetParent()Obtain parent of this ref; used by getChild for ".." paths.scala.concurrent.ExecutionContextinternalCallingThreadExecutionContext()booleanisTerminated()INTERNAL API: Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain.java.lang.StringmessageClassName()voidmessageClassName_$eq(java.lang.String x$1)voidonComplete(java.lang.Object message, boolean alreadyCompleted)voidonTimeout(Timeout timeout)ActorPathpath()Contract of this method: Must always return the same ActorPath, which must have been registered if we haven't been stopped yet.ActorRefProviderprovider()Get a reference to the actor ref provider which created this ref.scala.concurrent.Promise<java.lang.Object>result()voidsendSystemMessage(SystemMessage message)voidstop()-
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
-
-
-
-
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()
-
provider
public ActorRefProvider provider()
Description copied from class:InternalActorRefGet a reference to the actor ref provider which created this ref.- Specified by:
providerin classInternalActorRef- Returns:
- (undocumented)
-
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)
-
getParent
public InternalActorRef getParent()
Description copied from class:InternalActorRefObtain parent of this ref; used by getChild for ".." paths.- Specified by:
getParentin interfaceMinimalActorRef- Specified by:
getParentin classInternalActorRef- 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.
-
$bang
public void $bang(java.lang.Object message, ActorRef sender)- Specified by:
$bangin interfaceMinimalActorRef- Specified by:
$bangin interfaceScalaActorRef
-
sendSystemMessage
public void sendSystemMessage(SystemMessage message)
- Specified by:
sendSystemMessagein interfaceMinimalActorRef- Specified by:
sendSystemMessagein classInternalActorRef
-
isTerminated
public boolean isTerminated()
Description copied from class:InternalActorRefINTERNAL API: Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain.- Specified by:
isTerminatedin interfaceMinimalActorRef- Specified by:
isTerminatedin classInternalActorRef- Returns:
- (undocumented)
-
stop
public void stop()
- Specified by:
stopin interfaceMinimalActorRef- Specified by:
stopin classInternalActorRef
-
ask
public scala.concurrent.Future<java.lang.Object> ask(ActorSelection actorSel, java.lang.Object message, Timeout timeout)
-
ask
public scala.concurrent.Future<java.lang.Object> ask(ActorRef actorRef, java.lang.Object message, Timeout timeout)
-
onComplete
public void onComplete(java.lang.Object message, boolean alreadyCompleted)
-
onTimeout
public void onTimeout(Timeout timeout)
-
$bang$default$2
public ActorRef $bang$default$2(java.lang.Object message)
- Specified by:
$bang$default$2in interfaceMinimalActorRef- Specified by:
$bang$default$2in interfaceScalaActorRef
-
-