io.vertx.kafka.client

## Class KafkaCodecs

- java.lang.Object
- - io.vertx.kafka.client.KafkaCodecs

-     public class KafkaCodecs
      extends Object

  A registry for Kafka Serializers and Deserializers allowing to lookup serializers by class.

  The `BufferSerializer` and `BufferDeserializer` are registered along with the out of the box Kafka ones.

  Vert.x Kafka Client uses it for looking up classes to find `Serializer` and `Deserializer` classes when using `KafkaConsumer.create(Vertx, Map, Class, Class)` or `KafkaProducer.create(Vertx, Map, Class, Class)`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KafkaCodecs()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> org.apache.kafka.common.serialization.Deserializer<T>` | `deserializer(Class<T> type)`
    `static <T> org.apache.kafka.common.serialization.Serializer<T>` | `serializer(Class<T> type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KafkaCodecs

          public KafkaCodecs()

  - ### Method Detail

    - #### serializer

          public static <T> org.apache.kafka.common.serialization.Serializer<T> serializer(Class<T> type)

      Returns:
        a serializer for the given `type`.

    - #### deserializer

          public static <T> org.apache.kafka.common.serialization.Deserializer<T> deserializer(Class<T> type)

      Returns:
        a deserializer for the given `type`.

Copyright © 2017. All rights reserved.