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
ConstructorsConstructorDescriptionDeserializerWrapper(String className, boolean key, DeserializationFailureHandler<T> failureHandler, BiConsumer<Throwable, Boolean> reportFailure, boolean failByDefault) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidDelegates to the underlying deserializer instance.deserialize(String topic, byte[] data) deserialize(String topic, org.apache.kafka.common.header.Headers headers, byte[] data) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.common.serialization.Deserializer
deserialize
-
Constructor Details
-
DeserializerWrapper
public DeserializerWrapper(String className, boolean key, DeserializationFailureHandler<T> failureHandler, BiConsumer<Throwable, Boolean> reportFailure, boolean failByDefault)
-
-
Method Details
-
configure
Delegates to the underlying deserializer instance.- Specified by:
configurein interfaceorg.apache.kafka.common.serialization.Deserializer<T>- Parameters:
configs- the configurationisKey- the key
-
deserialize
- Specified by:
deserializein interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
deserialize
- Specified by:
deserializein interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-