trait ActorRef[-T] extends RecipientRef[T] with Comparable[ActorRef[_]] with Serializable
An ActorRef is the identity or address of an Actor instance. It is valid only during the Actor’s lifetime and allows messages to be sent to that Actor instance. Sending a message to an Actor that has terminated before receiving the message will lead to that message being discarded; such messages are delivered to the DeadLetter channel of the akka.event.EventStream on a best effort basis (i.e. this delivery is not reliable).
Not for user extension
- Self Type
- ActorRef[T] with InternalRecipientRef[T]
- Annotations
- @DoNotInherit()
- Source
- ActorRef.scala
- Alphabetic
- By Inheritance
- ActorRef
- Serializable
- Comparable
- RecipientRef
- AnyRef
- Any
- by ActorRefOps
- by RecipientRefOps
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def compareTo(arg0: ActorRef[_]): Int
- Definition Classes
- Comparable
- abstract def narrow[U <: T]: ActorRef[U]
Narrow the type of this
ActorRef
, which is always a safe operation. - abstract def path: ActorPath
The hierarchical path name of the referenced Actor.
The hierarchical path name of the referenced Actor. The lifecycle of the ActorRef is fully contained within the lifecycle of the akka.actor.ActorPath and more than one Actor instance can exist with the same path at different points in time, but not concurrently.
- abstract def tell(msg: T): Unit
Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.
Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.
- Definition Classes
- ActorRef → RecipientRef
- abstract def unsafeUpcast[U >: T]: ActorRef[U]
Unsafe utility method for widening the type accepted by this ActorRef; provided to avoid having to use
asInstanceOf
on the full reference type, which would unfortunately also work on non-ActorRefs.Unsafe utility method for widening the type accepted by this ActorRef; provided to avoid having to use
asInstanceOf
on the full reference type, which would unfortunately also work on non-ActorRefs. Use it with caution,it may cause a ClassCastException when you send a message to the widened ActorRef[U].
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (ActorRef[T], B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def ensuring(cond: (ActorRef[T]) => Boolean, msg: => Any): ActorRef[T]
- def ensuring(cond: (ActorRef[T]) => Boolean): ActorRef[T]
- def ensuring(cond: Boolean, msg: => Any): ActorRef[T]
- def ensuring(cond: Boolean): ActorRef[T]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Shadowed Implicit Value Members
- def !(msg: T): Unit
Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.
Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.
- Implicit
- This member is added by an implicit conversion from ActorRef[T] toActorRefOps[T] performed by method ActorRefOps in akka.actor.typed.ActorRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorRef: ActorRefOps[T]).!(msg)
- Definition Classes
- ActorRefOps
- def !(msg: T): Unit
Send a message to the destination referenced by this
RecipientRef
using *at-most-once* messaging semantics.Send a message to the destination referenced by this
RecipientRef
using *at-most-once* messaging semantics.- Implicit
- This member is added by an implicit conversion from ActorRef[T] toRecipientRefOps[T] performed by method RecipientRefOps in akka.actor.typed.RecipientRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorRef: RecipientRefOps[T]).!(msg)
- Definition Classes
- RecipientRefOps
- val ref: ActorRef[T]
- Implicit
- This member is added by an implicit conversion from ActorRef[T] toActorRefOps[T] performed by method ActorRefOps in akka.actor.typed.ActorRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorRef: ActorRefOps[T]).ref
- Definition Classes
- ActorRefOps
- val ref: RecipientRef[T]
- Implicit
- This member is added by an implicit conversion from ActorRef[T] toRecipientRefOps[T] performed by method RecipientRefOps in akka.actor.typed.RecipientRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorRef: RecipientRefOps[T]).ref
- Definition Classes
- RecipientRefOps
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ActorRef[T] toStringFormat[ActorRef[T]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (ActorRef[T], B)
- Implicit
- This member is added by an implicit conversion from ActorRef[T] toArrowAssoc[ActorRef[T]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.