public abstract class ActorSelection
extends java.lang.Object
implements scala.Serializable
Constructor and Description |
---|
ActorSelection() |
Modifier and Type | Method and Description |
---|---|
protected abstract ActorRef |
anchor() |
ActorPath |
anchorPath()
The
ActorPath of the anchor actor. |
static ActorSelection |
apply(ActorRef anchorRef,
scala.collection.Iterable<java.lang.String> elements)
Construct an ActorSelection from the given string representing a path
relative to the given target.
|
static ActorSelection |
apply(ActorRef anchorRef,
java.lang.String path)
Construct an ActorSelection from the given string representing a path
relative to the given target.
|
static void |
deliverSelection(InternalActorRef anchor,
ActorRef sender,
ActorSelectionMessage sel)
INTERNAL API
The receive logic for ActorSelectionMessage.
|
boolean |
equals(java.lang.Object obj) |
void |
forward(java.lang.Object message,
ActorContext context)
Forwards the message and passes the original sender actor as the sender.
|
int |
hashCode() |
protected abstract scala.collection.immutable.IndexedSeq<SelectionPathElement> |
path() |
java.lang.String |
pathString()
String representation of the path elements, starting with "/" and separated with "/".
|
scala.concurrent.Future<ActorRef> |
resolveOne(scala.concurrent.duration.FiniteDuration timeout)
Resolve the
ActorRef matching this selection. |
scala.concurrent.Future<ActorRef> |
resolveOne(Timeout timeout)
Resolve the
ActorRef matching this selection. |
java.util.concurrent.CompletionStage<ActorRef> |
resolveOneCS(scala.concurrent.duration.FiniteDuration timeout)
Java API for
resolveOne(akka.util.Timeout) |
void |
tell(java.lang.Object msg,
ActorRef sender)
Sends the specified message to this ActorSelection, i.e.
|
static ScalaActorSelection |
toScala(ActorSelection sel) |
java.lang.String |
toSerializationFormat()
String representation of the actor selection suitable for storage and recreation.
|
java.lang.String |
toString() |
public static ScalaActorSelection toScala(ActorSelection sel)
public static ActorSelection apply(ActorRef anchorRef, java.lang.String path)
anchorRef
- (undocumented)path
- (undocumented)public static ActorSelection apply(ActorRef anchorRef, scala.collection.Iterable<java.lang.String> elements)
anchorRef
- (undocumented)elements
- (undocumented)public static void deliverSelection(InternalActorRef anchor, ActorRef sender, ActorSelectionMessage sel)
anchor
- (undocumented)sender
- (undocumented)sel
- (undocumented)protected abstract ActorRef anchor()
protected abstract scala.collection.immutable.IndexedSeq<SelectionPathElement> path()
public void tell(java.lang.Object msg, ActorRef sender)
Pass ActorRef.noSender()
or null
as sender if there is nobody to reply to
msg
- (undocumented)sender
- (undocumented)public void forward(java.lang.Object message, ActorContext context)
Works, no matter whether originally sent with tell/'!' or ask/'?'.
message
- (undocumented)context
- (undocumented)public scala.concurrent.Future<ActorRef> resolveOne(Timeout timeout)
ActorRef
matching this selection.
The result is returned as a Future that is completed with the ActorRef
if such an actor exists. It is completed with failure ActorNotFound
if
no such actor exists or the identification didn't complete within the
supplied timeout
.
Under the hood it talks to the actor to verify its existence and acquire its
ActorRef
.
timeout
- (undocumented)public scala.concurrent.Future<ActorRef> resolveOne(scala.concurrent.duration.FiniteDuration timeout)
ActorRef
matching this selection.
The result is returned as a Future that is completed with the ActorRef
if such an actor exists. It is completed with failure ActorNotFound
if
no such actor exists or the identification didn't complete within the
supplied timeout
.
Under the hood it talks to the actor to verify its existence and acquire its
ActorRef
.
timeout
- (undocumented)public java.util.concurrent.CompletionStage<ActorRef> resolveOneCS(scala.concurrent.duration.FiniteDuration timeout)
resolveOne(akka.util.Timeout)
Resolve the ActorRef
matching this selection.
The result is returned as a CompletionStage that is completed with the ActorRef
if such an actor exists. It is completed with failure ActorNotFound
if
no such actor exists or the identification didn't complete within the
supplied timeout
.
timeout
- (undocumented)public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String pathString()
public java.lang.String toSerializationFormat()
ActorPath.toSerializationFormat()
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object