Class EventTransformation.TransformStep
java.lang.Object
io.axoniq.framework.messaging.transformation.events.EventTransformation.TransformStep
- Enclosing interface:
EventTransformation
Continuation of
from(...).to(...); supplies the payload mapper.-
Method Summary
Modifier and TypeMethodDescription<T,U> EventTransformation transform(Class<T> inputType, BiFunction<T, @Nullable ProcessingContext, U> payloadMapper) Supply the payload mapping behavior for a non-generic input type.<T,U> EventTransformation Supply a context-free payload mapper for a non-generic input type.<T,U> EventTransformation transform(TypeReference<T> inputType, BiFunction<T, @Nullable ProcessingContext, U> payloadMapper) Generic-type overload.<T,U> EventTransformation transform(TypeReference<T> inputType, Function<T, U> payloadMapper) Context-free variant oftransform(TypeReference, BiFunction).
-
Method Details
-
transform
public <T,U> EventTransformation transform(Class<T> inputType, BiFunction<T, @Nullable ProcessingContext, U> payloadMapper) Supply the payload mapping behavior for a non-generic input type.- Type Parameters:
T- input payload typeU- output payload type- Parameters:
inputType- the type the stored payload is converted to before invocationpayloadMapper- maps the input payload and processing context to its transformed output- Returns:
- the resulting
EventTransformation
-
transform
Supply a context-free payload mapper for a non-generic input type. Convenience overload oftransform(Class, BiFunction)for transformations that derive their output purely from the input payload and have no use for theProcessingContext.- Type Parameters:
T- input payload typeU- output payload type- Parameters:
inputType- the type the stored payload is converted to before invocationpayloadMapper- maps the input payload to its transformed output- Returns:
- the resulting
EventTransformation
-
transform
public <T,U> EventTransformation transform(TypeReference<T> inputType, BiFunction<T, @Nullable ProcessingContext, U> payloadMapper) Generic-type overload. Use this wheninputTypecarries type parameters (e.g.Map<String, Object>,List<Foo>).- Type Parameters:
T- input payload typeU- output payload type- Parameters:
inputType- theTypeReferencethe stored payload is converted topayloadMapper- maps the input payload and processing context to its transformed output- Returns:
- the resulting
EventTransformation
-
transform
public <T,U> EventTransformation transform(TypeReference<T> inputType, Function<T, U> payloadMapper) Context-free variant oftransform(TypeReference, BiFunction). Use this wheninputTypecarries type parameters (e.g.Map<String, Object>,List<Foo>) and the mapper has no use for theProcessingContext.- Type Parameters:
T- input payload typeU- output payload type- Parameters:
inputType- theTypeReferencethe stored payload is converted topayloadMapper- maps the input payload to its transformed output- Returns:
- the resulting
EventTransformation
-