Package akka.actor
Class ActorRef
- java.lang.Object
-
- akka.actor.ActorRef
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ActorRef>,scala.Serializable
- Direct Known Subclasses:
InternalActorRef
public abstract class ActorRef extends java.lang.Object implements java.lang.Comparable<ActorRef>, scala.Serializable
Returns the path for this actor (from this actor up to the root actor).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActorRef()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(ActorRef other)Comparison takes path and the unique id of the actor cell into account.booleanequals(java.lang.Object that)Equals takes path and the unique id of the actor cell into account.voidforward(java.lang.Object message, ActorContext context)Forwards the message and passes the original sender actor as the sender.inthashCode()abstract booleanisTerminated()INTERNAL API Is the actor shut down? The contract is that if this method returns true, then it will never be false again.static ActorRefnoSender()abstract ActorPathpath()voidtell(java.lang.Object msg, ActorRef sender)Sends the specified message to this ActorRef, i.e.java.lang.StringtoString()
-
-
-
Method Detail
-
noSender
public static final ActorRef noSender()
-
path
public abstract ActorPath path()
-
compareTo
public final int compareTo(ActorRef other)
Comparison takes path and the unique id of the actor cell into account.- Specified by:
compareToin interfacejava.lang.Comparable<ActorRef>- Parameters:
other- (undocumented)- Returns:
- (undocumented)
-
tell
public final void tell(java.lang.Object msg, ActorRef sender)Sends the specified message to this ActorRef, i.e. fire-and-forget semantics, including the sender reference if possible.Pass
ActorRefnoSenderornullas sender if there is nobody to reply to- Parameters:
msg- (undocumented)sender- (undocumented)
-
forward
public void forward(java.lang.Object message, ActorContext context)Forwards the message and passes the original sender actor as the sender.Works, no matter whether originally sent with tell/'!' or ask/'?'.
- Parameters:
message- (undocumented)context- (undocumented)
-
isTerminated
public abstract boolean isTerminated()
INTERNAL API Is the actor shut down? The contract is that if this method returns true, then it will never be false again. But you cannot rely on that it is alive if it returns false, since this by nature is a racy method.- Returns:
- (undocumented)
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object that)
Equals takes path and the unique id of the actor cell into account.- Overrides:
equalsin classjava.lang.Object- Parameters:
that- (undocumented)- Returns:
- (undocumented)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-