object Receptionist extends ExtensionId[Receptionist]
A Receptionist is an entry point into an Actor hierarchy where select Actors publish their identity together with the protocols that they implement. Other Actors need only know the Receptionist’s identity in order to be able to use the services of the registered Actors.
These are the messages (and the extension) for interacting with the receptionist. The receptionist is easiest accessed through the system: ActorSystem.receptionist
- Source
- Receptionist.scala
- Alphabetic
- By Inheritance
- Receptionist
- ExtensionId
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class Command extends AnyRef
The set of commands accepted by a Receptionist.
The set of commands accepted by a Receptionist.
Not for user Extension
- Annotations
- @DoNotInherit()
- trait Deregistered extends AnyRef
Confirmation that the given akka.actor.typed.ActorRef no more associated with the ServiceKey in the local receptionist.
Confirmation that the given akka.actor.typed.ActorRef no more associated with the ServiceKey in the local receptionist. Note that this does not guarantee that subscribers has yet seen that the service is deregistered.
Not for user extension
- Annotations
- @DoNotInherit()
- trait Listing extends AnyRef
Current listing of all Actors that implement the protocol given by the ServiceKey.
Current listing of all Actors that implement the protocol given by the ServiceKey.
You can use
key.Listing
for type-safe pattern matching.Not for user extension.
- Annotations
- @DoNotInherit()
- trait Registered extends AnyRef
Confirmation that the given akka.actor.typed.ActorRef has been associated with the ServiceKey.
Confirmation that the given akka.actor.typed.ActorRef has been associated with the ServiceKey.
You can use
key.Registered
for type-safe pattern matching.Not for user extension
- Annotations
- @DoNotInherit()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def apply(system: ActorSystem[_]): Receptionist
Lookup or create an instance of the extension identified by this id.
Lookup or create an instance of the extension identified by this id.
- Definition Classes
- ExtensionId
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def createExtension(system: ActorSystem[_]): Receptionist
Create the extension, will be invoked at most one time per actor system where the extension is registered.
Create the extension, will be invoked at most one time per actor system where the extension is registered.
- Definition Classes
- Receptionist → ExtensionId
- def deregister[T](key: ServiceKey[T], service: ActorRef[T], replyTo: ActorRef[Deregistered]): Command
Java API: A Deregister message with an actor that will get an ack that the service was unregistered
- def deregister[T](key: ServiceKey[T], service: ActorRef[T]): Command
Java API: A Deregister message without Ack that the service was unregistered
- def deregistered[T](key: ServiceKey[T], serviceInstance: ActorRef[T]): Deregistered
Java API: Sent by the receptionist, available here for easier testing
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(other: Any): Boolean
- Definition Classes
- ExtensionId → AnyRef → Any
- def find[T](key: ServiceKey[T], replyTo: ActorRef[Listing]): Command
Java API:
Find
message.Java API:
Find
message. Query the Receptionist for a list of all Actors implementing the given protocol at one point in time by sending this command to the Receptionist.ref. - def get(system: ActorSystem[_]): Receptionist
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def hashCode(): Int
- Definition Classes
- ExtensionId → AnyRef → Any
- def id: ExtensionId[Receptionist]
Java API: The identifier of the extension
Java API: The identifier of the extension
- Definition Classes
- ExtensionId
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listing[T](key: ServiceKey[T], serviceInstances: Set[ActorRef[T]], allServiceInstances: Set[ActorRef[T]], servicesWereAddedOrRemoved: Boolean): Listing
Java API: Sent by the receptionist, available here for easier testing
- def listing[T](key: ServiceKey[T], serviceInstances: Set[ActorRef[T]]): Listing
Java API: Sent by the receptionist, available here for easier testing
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def register[T](key: ServiceKey[T], service: ActorRef[T], replyTo: ActorRef[Registered]): Command
Java API: A
Register
message with Ack that the service was registered.Java API: A
Register
message with Ack that the service was registered. Associate the given akka.actor.typed.ActorRef with the given ServiceKey by sending this command to the Receptionist.ref.Multiple registrations can be made for the same key. De-registration is implied by the end of the referenced Actor’s lifecycle, but it can also be explicitly deregistered before termination.
Registration will be acknowledged with the Registered message to the given replyTo actor.
- def register[T](key: ServiceKey[T], service: ActorRef[T]): Command
Java API: A Register message without Ack that the service was registered.
Java API: A Register message without Ack that the service was registered. Associate the given akka.actor.typed.ActorRef with the given ServiceKey by sending this command to the Receptionist.ref.
Multiple registrations can be made for the same key. De-registration is implied by the end of the referenced Actor’s lifecycle, but it can also be explicitly deregistered before termination.
- def registered[T](key: ServiceKey[T], serviceInstance: ActorRef[T]): Registered
Java API: Sent by the receptionist, available here for easier testing
- def subscribe[T](key: ServiceKey[T], subscriber: ActorRef[Listing]): Command
Java API:
Subscribe
message.Java API:
Subscribe
message. The given actor to service updates when this command is sent to the Receptionist.ref. When the set of instances registered for the given key changes the subscriber will be sent a Listing with the new set of instances for that service.The subscription will be acknowledged by sending out a first Listing. The subscription automatically ends with the termination of the subscriber.
- 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])
- object Deregister
Remove association between the given akka.actor.typed.ActorRef and the given ServiceKey.
Remove association between the given akka.actor.typed.ActorRef and the given ServiceKey.
Deregistration can be acknowledged with the Deregistered message if the deregister message is created with a
replyTo
actor.Note that getting the Deregistered confirmation does not mean all service key subscribers has seen the fact that the actor has been deregistered yet (especially in a clustered context) so it will be possible that messages sent to the actor in the role of service provider arrive even after getting the confirmation.
- object Deregistered
Sent by the receptionist, available here for easier testing
- object Find
Find
message.Find
message. Query the Receptionist for a list of all Actors implementing the given protocol at one point in time by sending this command to the Receptionist.ref. - object Listing
Sent by the receptionist, available here for easier testing
- object Register
Register
message.Register
message. Associate the given akka.actor.typed.ActorRef with the given ServiceKey by sending this command to the Receptionist.ref.Multiple registrations can be made for the same key. De-registration is implied by the end of the referenced Actor’s lifecycle, but it can also be explicitly deregistered before termination.
Registration will be acknowledged with the Registered message to the given replyTo actor if there is one.
- object Registered
Sent by the receptionist, available here for easier testing
- object Subscribe
Subscribe
message.Subscribe
message. The given actor will subscribe to service updates when this command is sent to the Receptionist.ref. When the set of instances registered for the given key changes the subscriber will be sent a Listing with the new set of instances for that service.The subscription will be acknowledged by sending out a first Listing. The subscription automatically ends with the termination of the subscriber.