public final class SerializationUtils
extends java.lang.Object
Modifier and Type | Method and 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 a
BiFunction that takes a
payload and headers and returns some value. |
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)
BiFunction
that takes a
payload and headers and returns some value. The method must have parameters
(P, Headers)
or (P)
and be declared as static.P
- The BiFunction
first parameter type.T
- The BiFunction
return type.methodProperty
- the method name property.payloadType
- the BiFunction
first parameter type.classLoader
- the class loader.