Class SerializationUtils
- java.lang.Object
-
- org.springframework.kafka.support.serializer.SerializationUtils
-
public final class SerializationUtils extends java.lang.Object
Utilities for serialization.- Since:
- 2.5
- Author:
- Gary Russell
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <P,T>
java.util.function.BiFunction<P,org.apache.kafka.common.header.Headers,T>propertyToMethodInvokingFunction(java.lang.String methodProperty, java.lang.Class<P> payloadType, java.lang.ClassLoader classLoader)
Convert a property value (FQCN.methodName) to aBiFunction
that takes a payload and headers and returns some value.
-
-
-
Method Detail
-
propertyToMethodInvokingFunction
public static <P,T> java.util.function.BiFunction<P,org.apache.kafka.common.header.Headers,T> propertyToMethodInvokingFunction(java.lang.String methodProperty, java.lang.Class<P> payloadType, java.lang.ClassLoader classLoader)
Convert a property value (FQCN.methodName) to aBiFunction
that takes a payload and headers and returns some value. The method must have parameters(P, Headers)
or(P)
and be declared as static.- Type Parameters:
P
- TheBiFunction
first parameter type.T
- TheBiFunction
return type.- Parameters:
methodProperty
- the method name property.payloadType
- theBiFunction
first parameter type.classLoader
- the class loader.- Returns:
- the function.
-
-