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.joinpoint.Invocation; 27 import org.jboss.aop.joinpoint.Joinpoint; 28 29 33 public class AdvicePerVm 34 { 35 private int intAttr; 36 private String stringAttr; 37 private Advisor advisor; 38 private InstanceAdvisor instanceAdvisor; 39 private Joinpoint joinpoint; 40 41 42 45 public Advisor getAdvisor() 46 { 47 return advisor; 48 } 49 50 53 public void setAdvisor(Advisor advisor) 54 { 55 this.advisor = advisor; 56 } 57 58 61 public InstanceAdvisor getInstanceAdvisor() 62 { 63 return instanceAdvisor; 64 } 65 66 69 public void setInstanceAdvisor(InstanceAdvisor instanceAdvisor) 70 { 71 this.instanceAdvisor = instanceAdvisor; 72 } 73 74 77 public int getIntAttr() 78 { 79 return intAttr; 80 } 81 82 85 public void setIntAttr(int intAttr) 86 { 87 this.intAttr = intAttr; 88 } 89 90 93 public Joinpoint getJoinpoint() 94 { 95 return joinpoint; 96 } 97 98 101 public void setJoinpoint(Joinpoint joinpoint) 102 { 103 this.joinpoint = joinpoint; 104 } 105 106 109 public String getStringAttr() 110 { 111 return stringAttr; 112 } 113 114 117 public void setStringAttr(String stringAttr) 118 { 119 this.stringAttr = stringAttr; 120 } 121 122 public Object invoke(Invocation invocation) throws Throwable 123 { 124 InvokedConfigs.addInvokedConfig(this.getClass().getName(), advisor, instanceAdvisor, joinpoint, intAttr, stringAttr); 125 return invocation.invokeNext(); 126 } 127 } 128 | Popular Tags |