jfun.yan.monitoring
Interface SetterMonitor

All Known Subinterfaces:
ComponentMonitor
All Known Implementing Classes:
NopComponentMonitor

public interface SetterMonitor

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

Author:
Michelle Lei

Method Summary
 void propertySet(java.lang.Object obj, java.beans.PropertyDescriptor desc, java.lang.Object val, long duration)
          This method is called after the setter is called successfully.
 void propertySetFailed(java.lang.Object obj, java.beans.PropertyDescriptor desc, java.lang.Object val, java.lang.Throwable err, long duration)
          This method is called after the setter failed.
 void propertySetting(java.lang.Object obj, java.beans.PropertyDescriptor desc, java.lang.Object val)
          This method is called right before the setter is called.
 

Method Detail

propertySetting

void propertySetting(java.lang.Object obj,
                     java.beans.PropertyDescriptor desc,
                     java.lang.Object val)
This method is called right before the setter is called.

Parameters:
obj - the java bean object.
desc - the descriptor for the property.
val - the property value to set.

propertySet

void propertySet(java.lang.Object obj,
                 java.beans.PropertyDescriptor desc,
                 java.lang.Object val,
                 long duration)
This method is called after the setter is called successfully.

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

propertySetFailed

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

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