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