KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > aop > MetricsInterceptorFactory


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.cache.aop;
8
9 import org.jboss.aop.Advisor;
10 import org.jboss.aop.InstanceAdvisor;
11 import org.jboss.aop.advice.Interceptor;
12 import org.jboss.aop.advice.InterceptorFactory;
13 import org.jboss.aop.joinpoint.Joinpoint;
14
15 /**
16  * This interceptor handles authentication creation and the initial
17  * population of class metadata
18  *
19  * @author <a HREF="mailto:bill@jboss.org">Bill Burke</a>
20  * @version $Revision: 1.5 $
21  */

22 public class MetricsInterceptorFactory implements org.jboss.aop.advice.AspectFactory
23 {
24    public Object JavaDoc createPerVM()
25    {
26       return new MetricsInterceptor();
27    }
28
29    public Object JavaDoc createPerClass(Advisor advisor)
30    {
31       return new MetricsInterceptor();
32    }
33
34    public Object JavaDoc createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
35    {
36       return new MetricsInterceptor();
37    }
38
39    public Object JavaDoc createPerJoinpoint(Advisor advisor, Joinpoint jp)
40    {
41       return new MetricsInterceptor();
42    }
43
44    public Object JavaDoc createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
45    {
46       return new MetricsInterceptor();
47    }
48
49    public String JavaDoc getName()
50    {
51       return getClass().getName();
52    }
53 }
54
Popular Tags