Key

final class Key[T](val name: String, val emptyValue: T)

Encapsulates the type, name and empty value for a context entry. All reads and writes from a context instance must be done using a context key, which will ensure the right type is used on both operations. The key's name is used when configuring mappings and incoming/outgoing/returning codecs for context propagation across channels.

If you try to read an entry from a context and such entry is not present, the empty value for the key is returned instead.

class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(that: Any): Boolean
Definition Classes
Any
override def hashCode(): Int
Definition Classes
Any

Concrete fields

val emptyValue: T
val name: String