Class EventTransformation.TransformStep

java.lang.Object
io.axoniq.framework.messaging.transformation.events.EventTransformation.TransformStep
Enclosing interface:
EventTransformation

public static final class EventTransformation.TransformStep extends Object
Continuation of from(...).to(...); supplies the payload mapper.
  • 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 type
      U - output payload type
      Parameters:
      inputType - the type the stored payload is converted to before invocation
      payloadMapper - maps the input payload and processing context to its transformed output
      Returns:
      the resulting EventTransformation
    • transform

      public <T, U> EventTransformation transform(Class<T> inputType, Function<T,U> payloadMapper)
      Supply a context-free payload mapper for a non-generic input type. Convenience overload of transform(Class, BiFunction) for transformations that derive their output purely from the input payload and have no use for the ProcessingContext.
      Type Parameters:
      T - input payload type
      U - output payload type
      Parameters:
      inputType - the type the stored payload is converted to before invocation
      payloadMapper - 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 when inputType carries type parameters (e.g. Map<String, Object>, List<Foo>).
      Type Parameters:
      T - input payload type
      U - output payload type
      Parameters:
      inputType - the TypeReference the stored payload is converted to
      payloadMapper - 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 of transform(TypeReference, BiFunction). Use this when inputType carries type parameters (e.g. Map<String, Object>, List<Foo>) and the mapper has no use for the ProcessingContext.
      Type Parameters:
      T - input payload type
      U - output payload type
      Parameters:
      inputType - the TypeReference the stored payload is converted to
      payloadMapper - maps the input payload to its transformed output
      Returns:
      the resulting EventTransformation