Interface ExtendedDeserializer<T>

  • Type Parameters:
    T -
    All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, Deserializer<T>
    All Known Implementing Classes:
    ExtendedDeserializer.Wrapper

    @Deprecated
    public interface ExtendedDeserializer<T>
    extends Deserializer<T>
    Deprecated.
    This class has been deprecated and will be removed in a future release. Please use Deserializer instead.
    A Deserializer that has access to the headers associated with the record. Prefer Deserializer if access to the headers is not required. Once Kafka drops support for Java 7, the deserialize() method introduced by this interface will be added to Deserializer with a default implementation so that backwards compatibility is maintained. This interface may be deprecated once that happens. A class that implements this interface is expected to have a constructor with no parameters.
    • Method Detail

      • deserialize

        T deserialize​(java.lang.String topic,
                      Headers headers,
                      byte[] data)
        Deprecated.
        Deserialize a record value from a byte array into a value or object.
        Specified by:
        deserialize in interface Deserializer<T>
        Parameters:
        topic - topic associated with the data
        headers - headers associated with the record; may be empty.
        data - serialized bytes; may be null; implementations are recommended to handle null by returning a value or null rather than throwing an exception.
        Returns:
        deserialized typed data; may be null