1 22 package org.jboss.test.aop.beanstyleconfig; 23 24 import org.jboss.aop.Advisor; 25 import org.jboss.aop.InstanceAdvisor; 26 import org.jboss.aop.advice.Interceptor; 27 import org.jboss.aop.joinpoint.Invocation; 28 import org.jboss.aop.joinpoint.Joinpoint; 29 30 34 public class InterceptorPerJoinpoint implements Interceptor 35 { 36 private int intAttr; 37 private String stringAttr; 38 private Advisor advisor; 39 private InstanceAdvisor instanceAdvisor; 40 private Joinpoint joinpoint; 41 42 43 46 public Advisor getAdvisor() 47 { 48 return advisor; 49 } 50 51 54 public void setAdvisor(Advisor advisor) 55 { 56 this.advisor = advisor; 57 } 58 59 62 public InstanceAdvisor getInstanceAdvisor() 63 { 64 return instanceAdvisor; 65 } 66 67 70 public void setInstanceAdvisor(InstanceAdvisor instanceAdvisor) 71 { 72 this.instanceAdvisor = instanceAdvisor; 73 } 74 75 78 public int getIntAttr() 79 { 80 return intAttr; 81 } 82 83 86 public void setIntAttr(int intAttr) 87 { 88 this.intAttr = intAttr; 89 } 90 91 94 public Joinpoint getJoinpoint() 95 { 96 return joinpoint; 97 } 98 99 102 public void setJoinpoint(Joinpoint joinpoint) 103 { 104 this.joinpoint = joinpoint; 105 } 106 107 110 public String getStringAttr() 111 { 112 return stringAttr; 113 } 114 115 118 public void setStringAttr(String stringAttr) 119 { 120 this.stringAttr = stringAttr; 121 } 122 123 public String getName() 124 { 125 return this.getClass().getName(); 126 } 127 128 131 public Object invoke(Invocation invocation) throws Throwable 132 { 133 InvokedConfigs.addInvokedConfig(this.getClass().getName(), advisor, instanceAdvisor, joinpoint, intAttr, stringAttr); 134 return invocation.invokeNext(); 135 } 136 137 } 138 | Popular Tags |