Package akka.actor
Class FunctionRef
- java.lang.Object
-
- akka.actor.ActorRef
-
- akka.actor.InternalActorRef
-
- akka.actor.FunctionRef
-
- All Implemented Interfaces:
ActorRefScope,LocalRef,MinimalActorRef,ScalaActorRef,java.io.Serializable,java.lang.Comparable<ActorRef>,scala.Serializable
public final class FunctionRef extends InternalActorRef implements MinimalActorRef
Have this FunctionRef watch the given Actor.Upon receiving the Terminated message,
unwatchmust be called to avoid resource leak, which is different from an ordinary actor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FunctionRef(ActorPath path, ActorRefProvider provider, ActorSystem system, scala.Function2<ActorRef,java.lang.Object,scala.runtime.BoxedUnit> f)
-
Method Summary
All 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)booleanisTerminated()INTERNAL API: Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain.booleanisWatching(ActorRef actorRef)Query whether this FunctionRef is currently watching the given Actor.ActorPathpath()ActorRefProviderprovider()Get a reference to the actor ref provider which created this ref.voidsendSystemMessage(SystemMessage message)protected voidsendTerminated()voidstop()voidunwatch(ActorRef actorRef)Have this FunctionRef unwatch the given Actor.voidwatch(ActorRef actorRef)Have this FunctionRef watch the given Actor.-
Methods inherited from class akka.actor.InternalActorRef
getChild, getParent, 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, getParent, restart, resume, start, suspend, writeReplace
-
-
-
-
Constructor Detail
-
FunctionRef
public FunctionRef(ActorPath path, ActorRefProvider provider, ActorSystem system, scala.Function2<ActorRef,java.lang.Object,scala.runtime.BoxedUnit> f)
-
-
Method Detail
-
$bang
public void $bang(java.lang.Object message, ActorRef sender)- Specified by:
$bangin interfaceMinimalActorRef- Specified by:
$bangin interfaceScalaActorRef
-
$bang$default$2
public ActorRef $bang$default$2(java.lang.Object message)
- Specified by:
$bang$default$2in interfaceMinimalActorRef- Specified by:
$bang$default$2in interfaceScalaActorRef
-
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)
-
isWatching
public boolean isWatching(ActorRef actorRef)
Query whether this FunctionRef is currently watching the given Actor.- Parameters:
actorRef- (undocumented)- Returns:
- (undocumented)
-
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)
-
sendSystemMessage
public void sendSystemMessage(SystemMessage message)
- Specified by:
sendSystemMessagein interfaceMinimalActorRef- Specified by:
sendSystemMessagein classInternalActorRef
-
sendTerminated
protected void sendTerminated()
-
stop
public void stop()
- Specified by:
stopin interfaceMinimalActorRef- Specified by:
stopin classInternalActorRef
-
unwatch
public void unwatch(ActorRef actorRef)
Have this FunctionRef unwatch the given Actor.Upon receiving the Terminated message,
unwatchmust be called to avoid resource leak, which is different from an ordinary actor.- Parameters:
actorRef- (undocumented)
-
watch
public void watch(ActorRef actorRef)
Have this FunctionRef watch the given Actor.Upon receiving the Terminated message,
unwatchmust be called to avoid resource leak, which is different from an ordinary actor.- Parameters:
actorRef- (undocumented)
-
-