1 17 package org.apache.servicemix.components.util; 18 19 import org.apache.commons.logging.Log; 20 import org.apache.commons.logging.LogFactory; 21 import org.apache.servicemix.MessageExchangeListener; 22 23 import javax.jbi.messaging.MessageExchange; 24 import javax.jbi.messaging.MessagingException; 25 import javax.jbi.messaging.NormalizedMessage; 26 27 32 public class EchoComponent extends TransformComponentSupport implements MessageExchangeListener { 33 private static final Log log = LogFactory.getLog(EchoComponent.class); 34 35 protected boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws MessagingException { 36 getMessageTransformer().transform(exchange, in, out); 37 log.info("Echoed back message: " + out); 38 return true; 39 } 40 } 41 | Popular Tags |