// MessageExchangeListener interface
//-------------------------------------------------------------------------
public void onMessageExchange(MessageExchange exchange) throws MessagingException {
NormalizedMessage inMessage = exchange.getMessage("in");
if (inMessage == null) {
throw new MessagingException("Null in message delivered!");
}
// Copy the message, in case the source is a closeable stream
NormalizedMessage copy = exchange.createMessage();
getMessageTransformer().transform(exchange, inMessage, copy);
// Add it to the list