HeaderDeserializer

Companion
class
class Object
trait Matchable
class Any

Type members

Types

type Attempt[A] = HeaderDeserializer[Either[Throwable, A]]

Alias for HeaderDeserializer[Either[Throwable, A]].

Alias for HeaderDeserializer[Either[Throwable, A]].

Value members

Concrete methods

def apply[A](deserializer: HeaderDeserializer[A]): HeaderDeserializer[A]
def attempt[A](deserializer: Attempt[A]): Attempt[A]
def const[A](a: A): HeaderDeserializer[A]

Creates a new HeaderDeserializer which deserializes all bytes to the specified value of type A.

Creates a new HeaderDeserializer which deserializes all bytes to the specified value of type A.

def delegate[A](deserializer: Deserializer[A]): HeaderDeserializer[A]

Creates a new HeaderDeserializer which delegates deserialization to the specified Kafka Deserializer. Please note that the close and configure functions won't be called for the delegate. Also, the topic is an empty String and no headers are provided.

Creates a new HeaderDeserializer which delegates deserialization to the specified Kafka Deserializer. Please note that the close and configure functions won't be called for the delegate. Also, the topic is an empty String and no headers are provided.

def instance[A](f: Array[Byte] => A): HeaderDeserializer[A]

Creates a new HeaderDeserializer from the specified function.

Creates a new HeaderDeserializer from the specified function.

def string(charset: Charset): HeaderDeserializer[String]

Creates a new HeaderDeserializer which deserializes String values using the specified Charset. Note that the default String deserializer uses UTF-8.

Creates a new HeaderDeserializer which deserializes String values using the specified Charset. Note that the default String deserializer uses UTF-8.

def uuid(charset: Charset): Attempt[UUID]

Creates a new HeaderDeserializer which deserializes String values using the specified Charset as UUIDs. Note that the default UUID deserializer uses UTF-8.

Creates a new HeaderDeserializer which deserializes String values using the specified Charset as UUIDs. Note that the default UUID deserializer uses UTF-8.

Implicits

Implicits

implicit val double: Attempt[Double]
implicit val float: Attempt[Float]
implicit val identity: HeaderDeserializer[Array[Byte]]

The identity HeaderDeserializer, which does not perform any kind of deserialization, simply using the input bytes as the output.

The identity HeaderDeserializer, which does not perform any kind of deserialization, simply using the input bytes as the output.

implicit val int: Attempt[Int]
implicit val long: Attempt[Long]
implicit val monad: Monad[[A] =>> HeaderDeserializer[A]]
implicit def option[A](deserializer: HeaderDeserializer[A]): HeaderDeserializer[Option[A]]

The option HeaderDeserializer returns None when the bytes are null, and otherwise deserializes using the deserializer for the type A, wrapping the result in Some.

The option HeaderDeserializer returns None when the bytes are null, and otherwise deserializes using the deserializer for the type A, wrapping the result in Some.

implicit val short: Attempt[Short]
implicit val string: HeaderDeserializer[String]
implicit val unit: HeaderDeserializer[Unit]
implicit val uuid: Attempt[UUID]