/**
 * 
 */
package camelinaction;

import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.model.ProcessorDefinition;
import org.apache.camel.spi.InterceptStrategy;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author janstey
 * 
 */
public class MyInterceptor implements InterceptStrategy {
	private static final transient Log log = LogFactory
	        .getLog(MyInterceptor.class);

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.apache.camel.spi.InterceptStrategy#wrapProcessorInInterceptors(org
	 * .apache.camel.CamelContext, org.apache.camel.model.ProcessorDefinition,
	 * org.apache.camel.Processor, org.apache.camel.Processor)
	 */
	public Processor wrapProcessorInInterceptors(CamelContext context,
	        ProcessorDefinition<?> definition, final Processor target,
	        Processor nextTarget) throws Exception {
		return new Processor() {

			public void process(Exchange exchange) throws Exception {
				log.info("Before the processor...");
				target.process(exchange);
				log.info("After the processor...");
			}
		};
	}

}

@@ -187,16 +187,74 @@
 nition;%0A
+import org.apache.camel.processor.DelegateAsyncProcessor;%0A
 import o
@@ -1004,15 +1004,81 @@
 %7B%0A%09%09
-return 
+// to make the Default channel happy%0A%09%09return new DelegateAsyncProcessor(
 new 
@@ -1272,16 +1272,17 @@
 %09%09%09%7D%0A%09%09%7D
+)
 ;%0A%09%7D%0A%0A%7D%0A

Return an AsyncProcessor in wrapProcessorInInterceptors to make the Default channel happy