T
- java.lang.AutoCloseable
, java.io.Closeable
, Deserializer<T>
ExtendedDeserializer.Wrapper
public interface ExtendedDeserializer<T> extends Deserializer<T>
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.Modifier and Type | Interface | Description |
---|---|---|
static class |
ExtendedDeserializer.Wrapper<T> |
Modifier and Type | Method | Description |
---|---|---|
T |
deserialize(java.lang.String topic,
Headers headers,
byte[] data) |
Deserialize a record value from a byte array into a value or object.
|
close, configure, deserialize
T deserialize(java.lang.String topic, Headers headers, byte[] data)
topic
- topic associated with the dataheaders
- 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.