de.is24.util.monitoring.aop
Class InApplicationMonitorInterceptor

java.lang.Object
  extended by de.is24.util.monitoring.aop.InApplicationMonitorInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class InApplicationMonitorInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor

This class implements a MethodInterceptor and measures the time the method invocation needs. That value is then reported to the InApplicationMonitor. The name of the value is the full qualified class name followed by the methods name. If a prefix is set the prefix is put before the monitor name, e.g. prefix:monitorname


Field Summary
(package private)  MeasurementHandler[] handlers
           
private static org.apache.log4j.Logger LOG
           
private  String prefix
           
 
Constructor Summary
InApplicationMonitorInterceptor()
           
 
Method Summary
protected  String getMonitorName(org.aopalliance.intercept.MethodInvocation mi)
           
 Object invoke(org.aopalliance.intercept.MethodInvocation mi)
          
 void setHandlers(MeasurementHandler[] handlers)
           
 void setPrefix(String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

prefix

private String prefix

handlers

MeasurementHandler[] handlers
Constructor Detail

InApplicationMonitorInterceptor

public InApplicationMonitorInterceptor()
Method Detail

setHandlers

public void setHandlers(MeasurementHandler[] handlers)

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation mi)
              throws Throwable

Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
Throwable

getMonitorName

protected String getMonitorName(org.aopalliance.intercept.MethodInvocation mi)

setPrefix

public void setPrefix(String prefix)


Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.