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 thepath
member is actually queried, which happens during serialization (but also during a simple call totoString
,equals
orhashCode
!).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 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)
static ActorRef
apply$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)
InternalActorRef
getParent()
Obtain parent of this ref; used by getChild for ".." paths.scala.concurrent.ExecutionContext
internalCallingThreadExecutionContext()
boolean
isTerminated()
INTERNAL API: Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain.java.lang.String
messageClassName()
void
messageClassName_$eq(java.lang.String x$1)
void
onComplete(java.lang.Object message, boolean alreadyCompleted)
void
onTimeout(Timeout timeout)
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
-
-
-
-
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:InternalActorRef
Get a reference to the actor ref provider which created this ref.- Specified by:
provider
in 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:InternalActorRef
Obtain parent of this ref; used by getChild for ".." paths.- Specified by:
getParent
in interfaceMinimalActorRef
- Specified by:
getParent
in 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:
$bang
in interfaceMinimalActorRef
- Specified by:
$bang
in interfaceScalaActorRef
-
sendSystemMessage
public void sendSystemMessage(SystemMessage message)
- Specified by:
sendSystemMessage
in interfaceMinimalActorRef
- Specified by:
sendSystemMessage
in classInternalActorRef
-
isTerminated
public boolean isTerminated()
Description copied from class:InternalActorRef
INTERNAL API: Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain.- Specified by:
isTerminated
in interfaceMinimalActorRef
- Specified by:
isTerminated
in classInternalActorRef
- Returns:
- (undocumented)
-
stop
public void stop()
- Specified by:
stop
in interfaceMinimalActorRef
- Specified by:
stop
in 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$2
in interfaceMinimalActorRef
- Specified by:
$bang$default$2
in interfaceScalaActorRef
-
-