Create an untyped child Actor from the given akka.actor.Props and with the given name.
Create an untyped child Actor from the given akka.actor.Props under a randomly chosen name.
Create an untyped child Actor from the given akka.actor.Props under a randomly chosen name. It is good practice to name Actors wherever practical.
The named child Actor if it is alive.
The list of child Actors created by this Actor during its lifetime that are still alive, in no particular order.
This Actor’s execution context.
This Actor’s execution context. It can be used to run asynchronous tasks like scala.concurrent.Future combinators.
The Props from which this Actor was created.
Schedule the sending of the given message to the given target Actor after the given time period has elapsed.
Schedule the sending of the given message to the given target Actor after
the given time period has elapsed. The scheduled action can be cancelled
by invoking akka.actor.Cancellable cancel
on the returned
handle.
The identity of this Actor, bound to the lifecycle of this Actor instance.
The identity of this Actor, bound to the lifecycle of this Actor instance. An Actor with the same name that lives before or after this instance will have a different ActorRef.
Schedule the sending of a ReceiveTimeout notification in case no other message is received during the given period of time.
Schedule the sending of a ReceiveTimeout notification in case no other
message is received during the given period of time. The timeout starts anew
with each received message. Provide Duration.Undefined
to switch off this
mechanism.
Create a child Actor from the given Props and with the given name.
Create a child actor that will wrap messages such that other Actor’s protocols can be ingested by this Actor.
Create a child actor that will wrap messages such that other Actor’s protocols can be ingested by this Actor. You are strongly advised to cache these ActorRefs or to stop them when no longer needed.
Create a child Actor from the given Props under a randomly chosen name.
Create a child Actor from the given Props under a randomly chosen name. It is good practice to name Actors wherever practical.
Force the child Actor under the given name to terminate after it finishes processing its current message.
Force the child Actor under the given name to terminate after it finishes processing its current message. Nothing happens if the ActorRef does not refer to a current child actor.
whether the passed-in ActorRef points to a current child Actor
The ActorSystem to which this Actor belongs.
Revoke the registration established by watch
.
Revoke the registration established by watch
. A Terminated
notification will not subsequently be received for the referenced Actor.
Revoke the registration established by watch
.
Revoke the registration established by watch
. A Terminated
notification will not subsequently be received for the referenced Actor.
Register for Terminated notification once the Actor identified by the given akka.actor.ActorRef terminates.
Register for Terminated notification once the Actor identified by the given akka.actor.ActorRef terminates. This notification is also generated when the ActorSystem to which the referenced Actor belongs is declared as failed (e.g. in reaction to being unreachable).
Register for Terminated notification once the Actor identified by the given ActorRef terminates.
Register for Terminated notification once the Actor identified by the given ActorRef terminates. This notification is also generated when the ActorSystem to which the referenced Actor belongs is declared as failed (e.g. in reaction to being unreachable).
An Actor is given by the combination of a Behavior and a context in which this behavior is executed. As per the Actor Model an Actor can perform the following actions when processing a message:
In Akka the first capability is accessed by using the
!
ortell
method on an ActorRef, the second is provided by ActorContext#spawn and the third is implicit in the signature of Behavior in that the next behavior is always returned from the message processing logic.An
ActorContext
in addition provides access to the Actor’s own identity (“self
”), the ActorSystem it is part of, methods for querying the list of child Actors it created, access to DeathWatch and timed message scheduling.