Class DeserializerWrapper<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.kafka.fault.DeserializerWrapper<T>
-
- Type Parameters:
T
- the type of object created by the deserializer.
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.kafka.common.serialization.Deserializer<T>
public class DeserializerWrapper<T> extends Object implements org.apache.kafka.common.serialization.Deserializer<T>
Wraps a delegate deserializer to handle config and deserialization failures.
-
-
Constructor Summary
Constructors Constructor Description DeserializerWrapper(String className, boolean key, DeserializationFailureHandler<T> failureHandler, KafkaSource<?,?> source, boolean failByDefault)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
configure(Map<String,?> configs, boolean isKey)
Delegates to the underlying deserializer instance.T
deserialize(String topic, byte[] data)
T
deserialize(String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
-
-
-
Constructor Detail
-
DeserializerWrapper
public DeserializerWrapper(String className, boolean key, DeserializationFailureHandler<T> failureHandler, KafkaSource<?,?> source, boolean failByDefault)
-
-
Method Detail
-
configure
public void configure(Map<String,?> configs, boolean isKey)
Delegates to the underlying deserializer instance.- Specified by:
configure
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
- Parameters:
configs
- the configurationisKey
- the key
-
deserialize
public T deserialize(String topic, byte[] data)
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
deserialize
public T deserialize(String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
-