etm.contrib.aop.aopalliance
Class EtmMethodCallInterceptor

java.lang.Object
  extended by etm.contrib.aop.aopalliance.EtmMethodCallInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
Direct Known Subclasses:
MonitoringBeanDefinitionParser.NamedEtmMethodCallInterceptor

public class EtmMethodCallInterceptor
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor

AopAlliance MethodInterceptor that may be used within Spring and other aop Alliance frameworks to collect method invocation times.

Version:
$Revision: 109 $
Author:
void.fm

Constructor Summary
EtmMethodCallInterceptor(EtmMonitor aEtmMonitor)
           
 
Method Summary
protected  void alterNamePostException(EtmPoint aEtmPoint, java.lang.Throwable t)
          Alter name in case an exception is caught during processing.
protected  java.lang.String calculateName(org.aopalliance.intercept.MethodInvocation aMethodInvocation)
          Calculate EtmPoint name based on the method invocation.
protected  java.lang.String calculateShortName(java.lang.Class clazz)
          Calculate short name for a given class.
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation aMethodInvocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtmMethodCallInterceptor

public EtmMethodCallInterceptor(EtmMonitor aEtmMonitor)
Method Detail

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation aMethodInvocation)
                        throws java.lang.Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable

calculateName

protected java.lang.String calculateName(org.aopalliance.intercept.MethodInvocation aMethodInvocation)
Calculate EtmPoint name based on the method invocation.

Parameters:
aMethodInvocation - The method invocation.
Returns:
The name of the EtmPoint.

alterNamePostException

protected void alterNamePostException(EtmPoint aEtmPoint,
                                      java.lang.Throwable t)
Alter name in case an exception is caught during processing. Altering the name takes place after executing target method. Ensure that you never cause an exception within this code.

Parameters:
aEtmPoint - The EtmPoint to alter.
t - The caught throwable t.

calculateShortName

protected java.lang.String calculateShortName(java.lang.Class clazz)
Calculate short name for a given class.

Parameters:
clazz - The class object.
Returns:
The short name for the given class.


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.