T
- Type to be deserialized into.
A class that implements this interface is expected to have a constructor with no parameter.public interface Deserializer<T>
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(java.util.Map<java.lang.String,?> configs,
boolean isKey)
Configure this class.
|
T |
deserialize(java.lang.String topic,
byte[] data) |
void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
configs
- configs in key/value pairsisKey
- whether is for key or valueT deserialize(java.lang.String topic, byte[] data)
topic
- topic associated with the datadata
- serialized bytesvoid close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable