sealed abstract class Headers extends AnyRef
Headers represent an immutable append-only collection of Headers. To create a new
Headers instance, you can use Headers#apply or Headers#empty and add an instance of
Header using append.
- Source
- Headers.scala
- Alphabetic
- By Inheritance
- Headers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def append[V](key: String, value: V)(implicit arg0: HeaderSerializer[V]): Headers
Creates a new Headers instance including a Header with the specified key and value.
- abstract def append(header: Header): Headers
Creates a new Headers instance with the specified Header included.
- abstract def asJava: KafkaHeaders
The Headers as an immutable Java Kafka
Headersinstance. - abstract def concat(that: Headers): Headers
Appends the specified Headers after these headers.
- abstract def exists(key: String): Boolean
Returns
trueif a header with the specified key exists; otherwisefalse. - abstract def isEmpty: Boolean
trueif no Headers are included; otherwisefalse. - abstract def toChain: Chain[Header]
The included Headers as a
Chain. - abstract def withKey(key: String): Option[Header]
Returns the first header with the specified key, wrapped in
Some, orNoneif no such header exists.Returns the first header with the specified key, wrapped in
Some, orNoneif no such header exists. The apply function is an alias.
Concrete 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(key: String): Option[Header]
Returns the first header with the specified key, wrapped in
Some, orNoneif no such header exists.Returns the first header with the specified key, wrapped in
Some, orNoneif no such header exists. Alias for withKey. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def nonEmpty: Boolean
trueif at least one Header is included; otherwisefalse. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()