1 16 17 package org.springframework.aop.interceptor; 18 19 import org.aopalliance.intercept.MethodInvocation; 20 21 37 public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterceptor { 38 39 private String prefix = ""; 40 41 private String suffix = ""; 42 43 44 47 public void setPrefix(String prefix) { 48 this.prefix = (prefix != null ? prefix : ""); 49 } 50 51 54 protected String getPrefix() { 55 return prefix; 56 } 57 58 61 public void setSuffix(String suffix) { 62 this.suffix = (suffix != null ? suffix : ""); 63 } 64 65 68 protected String getSuffix() { 69 return suffix; 70 } 71 72 73 81 protected String createInvocationTraceName(MethodInvocation invocation) { 82 StringBuffer sb = new StringBuffer (getPrefix()); 83 sb.append(invocation.getMethod().getDeclaringClass().getName()); 84 sb.append('.').append(invocation.getMethod().getName()); 85 sb.append(getSuffix()); 86 return sb.toString(); 87 } 88 89 } 90 | Popular Tags |