ActorRef

abstract class ActorRef(val address: Address)

Abstract class representing a reference to an actor in the system. Contains basic information about the actor and defines methods for interacting with it.

Inheritors

Constructors

Link copied to clipboard
constructor(address: Address)

Properties

Link copied to clipboard

The address of the actor.

Functions

Link copied to clipboard

Sends a message to the actor and awaits a response using the default timeout.

abstract suspend fun <R : ActorProtocol.Response, M : ActorProtocol.Message<R>> ask(msg: M, timeout: Duration): Result<R>

Sends a message to the actor and awaits a response within a specified timeout.

Link copied to clipboard
abstract suspend fun shutdown(): Result<Unit>

Initiates the shutdown process for the actor associated with this ActorRef.

Link copied to clipboard
abstract suspend fun stats(): Result<Actor.Stats>

Retrieves the statistics of the actor associated with this ActorRef.

Link copied to clipboard
abstract suspend fun status(): Result<Actor.Status>

Retrieves the current status of the actor associated with this ActorRef.

Link copied to clipboard
abstract suspend fun tell(msg: ActorProtocol): Result<Unit>

Sends a message to the actor associated with this ActorRef.

Link copied to clipboard
abstract override fun toString(): String

Returns the string representation of the actor reference.