jfun.yan.monitoring
Interface GetterMonitor

All Known Subinterfaces:
ComponentMonitor
All Known Implementing Classes:
NopComponentMonitor

public interface GetterMonitor

This interface represents something that monitors the invocation of a java bean getter.

Author:
Michelle Lei

Method Summary
 void propertyGetFailed(java.lang.Object obj, java.beans.PropertyDescriptor desc, java.lang.Throwable err, long duration)
          This method is called after the getter failed.
 void propertyGetting(java.lang.Object obj, java.beans.PropertyDescriptor desc)
          This method is called right before the getter is called.
 void propertyGot(java.lang.Object obj, java.beans.PropertyDescriptor desc, java.lang.Object result, long duration)
          This method is called after the getter is called successfully.
 

Method Detail

propertyGetting

void propertyGetting(java.lang.Object obj,
                     java.beans.PropertyDescriptor desc)
This method is called right before the getter is called.

Parameters:
obj - the java bean object.
desc - the descriptor for the property.

propertyGot

void propertyGot(java.lang.Object obj,
                 java.beans.PropertyDescriptor desc,
                 java.lang.Object result,
                 long duration)
This method is called after the getter is called successfully.

Parameters:
obj - the java bean object.
desc - the descriptor for the property.
result - the property value.
duration - exactly how long it took to run the getter. (in milliseconds)

propertyGetFailed

void propertyGetFailed(java.lang.Object obj,
                       java.beans.PropertyDescriptor desc,
                       java.lang.Throwable err,
                       long duration)
This method is called after the getter failed.

Parameters:
obj - the java bean object.
desc - the descriptor for the property.
err - the exception thrown out of the getter.
duration - exactly how long it took to run the getter. (in milliseconds)