Class ToFromStringSerde<T>
- java.lang.Object
-
- org.springframework.kafka.support.serializer.ToFromStringSerde<T>
-
- Type Parameters:
T
- the type.
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.kafka.common.serialization.Serde<T>
public class ToFromStringSerde<T> extends java.lang.Object implements org.apache.kafka.common.serialization.Serde<T>
A Serde that delegates to aToStringSerializer
andParseStringDeserializer
.- Since:
- 2.5
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description ToFromStringSerde(ToStringSerializer<T> toStringSerializer, ParseStringDeserializer<T> fromStringDeserializer)
Construct an instance with the provided properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
org.apache.kafka.common.serialization.Deserializer<T>
deserializer()
org.apache.kafka.common.serialization.Serializer<T>
serializer()
-
-
-
Constructor Detail
-
ToFromStringSerde
public ToFromStringSerde(ToStringSerializer<T> toStringSerializer, ParseStringDeserializer<T> fromStringDeserializer)
Construct an instance with the provided properties.- Parameters:
toStringSerializer
- theToStringSerializer
.fromStringDeserializer
- theParseStringDeserializer
.
-
-
Method Detail
-
configure
public void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
- Specified by:
configure
in interfaceorg.apache.kafka.common.serialization.Serde<T>
-
serializer
public org.apache.kafka.common.serialization.Serializer<T> serializer()
- Specified by:
serializer
in interfaceorg.apache.kafka.common.serialization.Serde<T>
-
-