1 22 package org.jboss.test.aop.scoped; 23 24 import org.jboss.aop.Advisor; 25 import org.jboss.aop.InstanceAdvisor; 26 import org.jboss.aop.advice.AspectFactory; 27 import org.jboss.aop.joinpoint.Joinpoint; 28 29 34 public class ScopedAspectFactory implements AspectFactory 35 { 36 37 public ScopedAspectFactory() 38 { 39 super(); 41 } 42 43 public Object createPerVM() 44 { 45 return new ScopedFactoryAspect(); 46 } 47 48 public Object createPerClass(Advisor advisor) 49 { 50 throw new RuntimeException ("Illegal scope"); 51 } 52 53 public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor) 54 { 55 throw new RuntimeException ("Illegal scope"); 56 } 57 58 public Object createPerJoinpoint(Advisor advisor, Joinpoint jp) 59 { 60 throw new RuntimeException ("Illegal scope"); 61 } 62 63 public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp) 64 { 65 throw new RuntimeException ("Illegal scope"); 66 } 67 68 public String getName() 69 { 70 return "ScopedAspectFactory"; 71 } 72 73 } 74 | Popular Tags |