1 22 import org.jboss.aop.joinpoint.Invocation; 23 import org.jboss.aop.advice.Interceptor; 24 25 30 public class BillingInterceptor implements Interceptor 31 { 32 public String getName() { return "BillingInterceptor"; } 33 34 public Object invoke(Invocation invocation) throws Throwable  35 { 36 System.out.println("billing amount: $" + invocation.getMetaData("billable", "amount")); 37 return invocation.invokeNext(); 38 } 39 } 40 | Popular Tags |