abstract class ServiceKey[T] extends AbstractServiceKey

A service key is an object that implements this trait for a given protocol T, meaning that it signifies that the type T is the entry point into the protocol spoken by that service (think of it as the set of first messages that a client could send).

Not for user extension, see factories in companion object: ServiceKey#create and ServiceKey#apply

Self Type
ServiceKey[T]
Annotations
@DoNotInherit()
Source
Receptionist.scala
Linear Supertypes
AbstractServiceKey, AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ServiceKey
  2. AbstractServiceKey
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ServiceKey()

Type Members

  1. type Protocol = T
    Definition Classes
    ServiceKey → AbstractServiceKey

Abstract Value Members

  1. abstract def id: String

Concrete Value Members

  1. def asServiceKey: ServiceKey[T]

    Type-safe down-cast

    Type-safe down-cast

    Definition Classes
    ServiceKey → AbstractServiceKey
  2. object Listing

    Scala API: Provides a type safe pattern match for listings.

    Scala API: Provides a type safe pattern match for listings.

    Using it for pattern match like this will return the reachable service instances:

    case MyServiceKey.Listing(reachable) =>

    In a non-clustered ActorSystem this will always be all registered instances for a service key. For a clustered environment services on nodes that have been observed unreachable are not among these (note that they could have become unreachable between this message being sent and the receiving actor processing it).

  3. object Registered

    Scala API: Provides a type safe pattern match for registration acks