Class FunctionRef<T>
- java.lang.Object
-
- akka.actor.testkit.typed.internal.FunctionRef<T>
-
- All Implemented Interfaces:
ActorRef<T>
,ActorRefImpl<T>
,InternalRecipientRef<T>
,RecipientRef<T>
,java.io.Serializable
,java.lang.Comparable<ActorRef<?>>
public final class FunctionRef<T> extends java.lang.Object implements ActorRef<T>, ActorRefImpl<T>, InternalRecipientRef<T>
INTERNAL APIA local synchronous ActorRef that invokes the given function for every message send. This reference cannot watch other references.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.typed.ActorRef
ActorRef.ActorRefOps<T>, ActorRef.ActorRefOps$
-
Nested classes/interfaces inherited from interface akka.actor.typed.RecipientRef
RecipientRef.RecipientRefOps<T>, RecipientRef.RecipientRefOps$
-
-
Constructor Summary
Constructors Constructor Description FunctionRef(ActorPath path, scala.Function2<T,FunctionRef<T>,scala.runtime.BoxedUnit> send)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLocal()
boolean
isTerminated()
ActorPath
path()
The hierarchical path name of the referenced Actor.ActorRefProvider
provider()
Get a reference to the actor ref provider which created this ref.void
sendSystem(SystemMessage signal)
void
tell(T message)
Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.typed.ActorRef
writeReplace
-
Methods inherited from interface akka.actor.typed.internal.ActorRefImpl
compareTo, equals, hashCode, narrow, toString, unsafeUpcast
-
Methods inherited from interface akka.actor.typed.internal.InternalRecipientRef
refPrefix
-
-
-
-
Constructor Detail
-
FunctionRef
public FunctionRef(ActorPath path, scala.Function2<T,FunctionRef<T>,scala.runtime.BoxedUnit> send)
-
-
Method Detail
-
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interfaceActorRefImpl<T>
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceInternalRecipientRef<T>
- Returns:
true
if the actor is locally known to be terminated,false
if alive or uncertain.
-
path
public ActorPath path()
Description copied from interface:ActorRef
The hierarchical path name of the referenced Actor. The lifecycle of the ActorRef is fully contained within the lifecycle of theActorPath
and more than one Actor instance can exist with the same path at different points in time, but not concurrently.
-
provider
public ActorRefProvider provider()
Description copied from interface:InternalRecipientRef
Get a reference to the actor ref provider which created this ref.- Specified by:
provider
in interfaceInternalRecipientRef<T>
-
sendSystem
public void sendSystem(SystemMessage signal)
- Specified by:
sendSystem
in interfaceActorRefImpl<T>
-
-