org.mod4j.runtime.aspects
Class TimingAspect

java.lang.Object
  extended by org.mod4j.runtime.aspects.TimingAspect
All Implemented Interfaces:
org.springframework.core.Ordered

public class TimingAspect
extends java.lang.Object
implements org.springframework.core.Ordered

Aspect to trace the time a method call has taken to complete.

Author:
Philippe Tjon-a-Hen

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
TimingAspect()
           
 
Method Summary
 int getOrder()
          
 void setOrder(int order)
          Allows the order of this aspect to be set.
 java.lang.Object time(org.aspectj.lang.ProceedingJoinPoint call)
          Logs the delta between entry and exit of an advised method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimingAspect

public TimingAspect()
Method Detail

time

public java.lang.Object time(org.aspectj.lang.ProceedingJoinPoint call)
                      throws java.lang.Throwable
Logs the delta between entry and exit of an advised method.

Parameters:
call - The intercepted ProceedingJoinPoint.
Returns:
The object the intercepted method call returns.
Throws:
java.lang.Throwable - Any Throwable thrown by the intercepted method call.

getOrder

public int getOrder()

Specified by:
getOrder in interface org.springframework.core.Ordered

setOrder

public void setOrder(int order)
Allows the order of this aspect to be set.

Parameters:
order - the order to set.


Copyright © 2010 Mod4j. All Rights Reserved.