1 22 package org.jboss.test.aop.proxy; 23 24 import org.jboss.aop.advice.Interceptor; 25 import org.jboss.aop.joinpoint.Invocation; 26 import org.jboss.aop.joinpoint.MethodInvocation; 27 28 import java.io.Serializable ; 29 30 36 public class EchoInterceptor implements Interceptor, Serializable 37 { 38 39 private static final long serialVersionUID = 1L; 40 41 public String getName() 42 { 43 return "EchoInterceptor"; 44 } 45 46 public Object invoke(Invocation invocation) throws Throwable 47 { 48 MethodInvocation mi = (MethodInvocation) invocation; 49 System.out.println(mi.getMethod().getName()); 50 return "echoed"; 51 } 52 } 53 | Popular Tags |