org.apache.kafka.common.serialization
Interface Deserializer<T>
- Type Parameters:
T
- Type to be deserialized into.
A class that implements this interface is expected to have a constructor with no parameter.
- All Known Implementing Classes:
- ByteArrayDeserializer, StringDeserializer
public interface Deserializer<T>
Method Summary |
void |
close()
Close this deserializer |
void |
configure(java.util.Map<java.lang.String,?> configs,
boolean isKey)
Configure this class. |
T |
deserialize(java.lang.String topic,
byte[] data)
|
configure
void configure(java.util.Map<java.lang.String,?> configs,
boolean isKey)
- Configure this class.
- Parameters:
configs
- configs in key/value pairsisKey
- whether is for key or value
deserialize
T deserialize(java.lang.String topic,
byte[] data)
- Parameters:
topic
- topic associated with the datadata
- serialized bytes
- Returns:
- deserialized object
close
void close()
- Close this deserializer