org.springframework.samples.petclinic.aspects
Class CallMonitoringAspect

java.lang.Object
  extended by org.springframework.samples.petclinic.aspects.CallMonitoringAspect

@ManagedResource(value="petclinic:type=CallMonitor")
public class CallMonitoringAspect
extends java.lang.Object

Simple AspectJ aspect that monitors call count and call invocation time. Implements the CallMonitor management interface.

Since:
2.5
Author:
Rob Harrop, Juergen Hoeller

Constructor Summary
CallMonitoringAspect()
           
 
Method Summary
 int getCallCount()
           
 long getCallTime()
           
 java.lang.Object invoke(org.aspectj.lang.ProceedingJoinPoint joinPoint)
           
 boolean isEnabled()
           
 void reset()
           
 void setEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallMonitoringAspect

public CallMonitoringAspect()
Method Detail

setEnabled

@ManagedAttribute
public void setEnabled(boolean enabled)

isEnabled

@ManagedAttribute
public boolean isEnabled()

reset

@ManagedOperation
public void reset()

getCallCount

@ManagedAttribute
public int getCallCount()

getCallTime

@ManagedAttribute
public long getCallTime()

invoke

public java.lang.Object invoke(org.aspectj.lang.ProceedingJoinPoint joinPoint)
                        throws java.lang.Throwable
Throws:
java.lang.Throwable


Copyright © 2010. All Rights Reserved.