1 22 package org.jboss.test.aop.scoped.ear.interceptor; 23 24 import org.jboss.aop.advice.Interceptor; 25 import org.jboss.aop.joinpoint.Invocation; 26 27 32 public class TestInterceptor implements Interceptor 33 { 34 public static int intercepted; 35 public static String scope; 36 37 public String getName() 38 { 39 return TestInterceptor.class.getName(); 40 } 41 42 public void setScope(String scope) 43 { 44 TestInterceptor.scope = scope; 45 } 46 47 public Object invoke(Invocation invocation) throws Throwable 48 { 49 intercepted++; 50 System.out.println("TestInterceptor intercepting"); 51 return invocation.invokeNext(); 52 } 53 54 55 } 56 | Popular Tags |