1 10 11 package org.mule.routing; 12 13 import org.apache.commons.logging.Log; 14 import org.apache.commons.logging.LogFactory; 15 import org.mule.impl.MuleEvent; 16 import org.mule.umo.UMOMessage; 17 import org.mule.umo.UMOSession; 18 import org.mule.umo.endpoint.UMOEndpoint; 19 import org.mule.umo.routing.RoutingException; 20 21 26 27 public class LoggingCatchAllStrategy extends AbstractCatchAllStrategy 28 { 29 private static final Log logger = LogFactory.getLog(MuleEvent.class); 30 31 public void setEndpoint(UMOEndpoint endpoint) 32 { 33 throw new UnsupportedOperationException ("An endpoint cannot be set on this Catch All strategy"); 34 } 35 36 public void setEndpoint(String endpoint) 37 { 38 throw new UnsupportedOperationException ("An endpoint cannot be set on this Catch All strategy"); 39 } 40 41 public UMOEndpoint getEndpoint() 42 { 43 return null; 44 } 45 46 public UMOMessage catchMessage(UMOMessage message, UMOSession session, boolean synchronous) 47 throws RoutingException 48 { 49 logger.warn("Message: " + message + " was not dispatched on session: " + session 50 + ". No routing path was defined for it."); 51 return null; 52 } 53 } 54 | Popular Tags |