Interface MessageTransformation<M extends Message>
- Type Parameters:
M- the message type accepted as input and emitted as output
- All Known Subinterfaces:
EventTransformation
public interface MessageTransformation<M extends Message>
Transforms messages of type
M.
A transformation accepts a Message of type M and produces zero or more transformed messages of the
same type.
- Since:
- 5.2.0
- Author:
- Laura Devriendt
-
Method Summary
Modifier and TypeMethodDescriptionMessageStream<? extends M> transform(M message, TransformationContext context) Transforms a message into zero or more messages of the same type.
-
Method Details
-
transform
Transforms a message into zero or more messages of the same type. If the transformation fails, the returned stream completes with the error.- Parameters:
message- the input message, cannot benullcontext- the transformation context, cannot benull- Returns:
- a stream of transformed messages, or a stream completed with an error if the transformation failed,
never
null - Throws:
NullPointerException- ifmessageorcontextisnull
-