transform
Message transform(Message message,
Channel in,
Channel out)
throws Exception
Alter data from the input channel to match the selected output channel.
When a message arrives in a 'in' channel, this method will be called once for each meaningful 'out' (that have at least one chained app).
Implementation can alter the original message or completely forge a new one.
- Parameters:
message
- The original message.in
- The input channel the message is coming from.out
- The desired ouput channel which specifies the type of transformation.
- Returns:
- The altered message(s) or null to interrupt the app chain flow.
- Throws:
Exception
- If any exception is thrown, it has the same effect as calling App.notifyOwner(e.getMessage(), e) and then returning null.