KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > monitoring > IndexedSetterMonitor


1 package jfun.yan.monitoring;
2
3 import java.beans.PropertyDescriptor JavaDoc;
4 /**
5  * <p>
6  * This interface represents something that monitors the invocation of an indexed java bean setter.
7  * </p>
8  * @author Michelle Lei
9  *
10  */

11 public interface IndexedSetterMonitor {
12   /**
13    * This method is called right before the setter is called.
14    * @param obj the java bean object.
15    * @param desc the descriptor for the property.
16    * @param ind the index.
17    * @param val the property value to set.
18    */

19   void propertySetting(Object JavaDoc obj, PropertyDescriptor JavaDoc desc, int ind, Object JavaDoc val);
20   /**
21    * This method is called after the setter is called successfully.
22    * @param obj the java bean object.
23    * @param desc the descriptor for the property.
24    * @param ind the index.
25    * @param val the property value to set.
26    * @param duration exactly how long it took to run the setter. (in milliseconds)
27    */

28   void propertySet(Object JavaDoc obj, PropertyDescriptor JavaDoc desc, int ind, Object JavaDoc val, long duration);
29   /**
30    * This method is called after the setter failed.
31    * @param obj the java bean object.
32    * @param desc the descriptor for the property.
33    * @param ind the index.
34    * @param val the property value to set.
35    * @param err the exception thrown out of the getter.
36    * @param duration exactly how long it took to run the setter. (in milliseconds)
37    */

38   void propertySetFailed(Object JavaDoc obj, PropertyDescriptor JavaDoc desc, int ind, Object JavaDoc val,
39           Throwable JavaDoc err, long duration);
40 }
41
Popular Tags