1 25 package org.objectweb.easybeans.tests.common.interceptors.business.order; 26 27 import static org.objectweb.easybeans.tests.common.helper.InterceptorHelper.addValue; 28 29 import javax.interceptor.AroundInvoke; 30 import javax.interceptor.InvocationContext; 31 32 import org.objectweb.easybeans.log.JLog; 33 import org.objectweb.easybeans.log.JLogFactory; 34 import org.objectweb.easybeans.tests.common.helper.InterceptorHelper; 35 41 public class PrintOrderInterceptor<E> { 42 43 46 private JLog logger = JLogFactory.getLog(InterceptorHelper.class); 47 48 51 private E order; 52 53 57 public PrintOrderInterceptor(final E order) { 58 this.order = order; 59 } 60 61 69 @AroundInvoke 70 public Object addOrder(final InvocationContext invocationContext) throws Exception { 71 logger.info("In the addOrder of PrinterOrderInterceptor: order={0}", order); 72 return addValue(invocationContext, order, this.getClass().toString()); 73 } 74 } 75 | Popular Tags |