KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > aop > regression > jbaop206inheritadvised > TestInterceptor


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.test.aop.regression.jbaop206inheritadvised;
8
9 import org.jboss.aop.advice.Interceptor;
10 import org.jboss.aop.joinpoint.Invocation;
11
12 /**
13  * A TestInterceptor.
14  *
15  * @author <a HREF="kabir.khan@jboss.com">Kabir Khan</a>
16  * @version $Revision: 41764 $
17  */

18 public class TestInterceptor implements Interceptor
19 {
20    public static boolean intercepted;
21    public String JavaDoc getName()
22    {
23       return "TestInterceptor";
24    }
25
26    public Object JavaDoc invoke(Invocation invocation) throws Throwable JavaDoc
27    {
28       intercepted = true;
29       return invocation.invokeNext();
30    }
31
32 }
33
Popular Tags