Package akka.remote
Class RemoteActorRef
- java.lang.Object
-
- akka.actor.ActorRef
-
- akka.actor.InternalActorRef
-
- akka.remote.RemoteActorRef
-
- All Implemented Interfaces:
ActorRefScope
,ScalaActorRef
,RemoteRef
,java.io.Serializable
,java.lang.Comparable<ActorRef>
public class RemoteActorRef extends InternalActorRef implements RemoteRef
INTERNAL API Remote ActorRef that is used when referencing the Actor on a different node than its "home" node. This reference is network-aware (remembers its origin) and immutable.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RemoteActorRef(RemoteTransport remote, Address localAddressToUse, ActorPath path, InternalActorRef getParent, scala.Option<Props> props, scala.Option<Deploy> deploy)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
$bang(java.lang.Object message, ActorRef sender)
Scala API: Sends a one-way asynchronous message.ActorRef
$bang$default$2(java.lang.Object message)
Association
cachedAssociation()
void
cachedAssociation_$eq(Association x$1)
int
cachedSendQueueIndex()
void
cachedSendQueueIndex_$eq(int x$1)
InternalActorRef
getChild(scala.collection.Iterator<java.lang.String> name)
Obtain ActorRef by possibly traversing the actor tree or looking it up at some provider-specific location.InternalActorRef
getParent()
Obtain parent of this ref; used by getChild for ".." paths.boolean
isTerminated()
Deprecated.Use context.watch(actor) and receive Terminated(actor).boolean
isWatchIntercepted(ActorRef watchee, ActorRef watcher)
Determine if a watch/unwatch message must be handled by the remoteWatcher actor, or sent to this remote refAddress
localAddressToUse()
ActorPath
path()
Returns the path for this actor (from this actor up to the root actor).RemoteActorRefProvider
provider()
Get a reference to the actor ref provider which created this ref.void
restart(java.lang.Throwable cause)
void
resume(java.lang.Throwable causedByFailure)
void
sendSystemMessage(SystemMessage message)
void
start()
void
stop()
void
suspend()
-
Methods inherited from class akka.actor.InternalActorRef
isLocal, isTemporaryRef
-
Methods inherited from class akka.actor.ActorRef
compareTo, equals, forward, hashCode, noSender, tell, toString
-
-
-
-
Constructor Detail
-
RemoteActorRef
public RemoteActorRef(RemoteTransport remote, Address localAddressToUse, ActorPath path, InternalActorRef getParent, scala.Option<Props> props, scala.Option<Deploy> deploy)
-
-
Method Detail
-
$bang
public void $bang(java.lang.Object message, ActorRef sender)
Description copied from class:ActorRef
Scala API: Sends a one-way asynchronous message. E.g. fire-and-forget semantics.If invoked from within an actor then the actor reference is implicitly passed on as the implicit 'sender' argument.
This actor 'sender' reference is then available in the receiving actor in the 'sender()' member variable, if invoked from within an Actor. If not then no sender is available.
actor ! message
- Specified by:
$bang
in interfaceScalaActorRef
- Specified by:
$bang
in classActorRef
-
$bang$default$2
public ActorRef $bang$default$2(java.lang.Object message)
- Specified by:
$bang$default$2
in interfaceScalaActorRef
- Overrides:
$bang$default$2
in classActorRef
-
cachedAssociation
public Association cachedAssociation()
-
cachedAssociation_$eq
public void cachedAssociation_$eq(Association x$1)
-
cachedSendQueueIndex
public int cachedSendQueueIndex()
-
cachedSendQueueIndex_$eq
public void cachedSendQueueIndex_$eq(int x$1)
-
getChild
public InternalActorRef getChild(scala.collection.Iterator<java.lang.String> name)
Description copied from class:InternalActorRef
Obtain ActorRef by possibly traversing the actor tree or looking it up at some provider-specific location. This method shall return the end result, i.e. not only the next step in the look-up; this will typically involve recursive invocation. A path element of ".." signifies the parent, a trailing "" element must be disregarded. If the requested path does not exist, return Nobody.- Specified by:
getChild
in classInternalActorRef
-
getParent
public InternalActorRef getParent()
Description copied from class:InternalActorRef
Obtain parent of this ref; used by getChild for ".." paths.- Specified by:
getParent
in classInternalActorRef
-
isTerminated
public boolean isTerminated()
Deprecated.Use context.watch(actor) and receive Terminated(actor). Since 2.2.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 classInternalActorRef
-
isWatchIntercepted
public boolean isWatchIntercepted(ActorRef watchee, ActorRef watcher)
Determine if a watch/unwatch message must be handled by the remoteWatcher actor, or sent to this remote ref
-
localAddressToUse
public Address localAddressToUse()
-
path
public ActorPath path()
Description copied from class:ActorRef
Returns the path for this actor (from this actor up to the root actor).
-
provider
public RemoteActorRefProvider provider()
Description copied from class:InternalActorRef
Get a reference to the actor ref provider which created this ref.- Specified by:
provider
in classInternalActorRef
-
restart
public void restart(java.lang.Throwable cause)
- Specified by:
restart
in classInternalActorRef
-
resume
public void resume(java.lang.Throwable causedByFailure)
- Specified by:
resume
in classInternalActorRef
-
sendSystemMessage
public void sendSystemMessage(SystemMessage message)
- Specified by:
sendSystemMessage
in classInternalActorRef
-
start
public void start()
- Specified by:
start
in classInternalActorRef
-
stop
public void stop()
- Specified by:
stop
in classInternalActorRef
-
suspend
public void suspend()
- Specified by:
suspend
in classInternalActorRef
-
-