KickJava   Java API By Example, From Geeks To Geeks.

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


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 getter.
7  * </p>
8  * @author Michelle Lei
9  *
10  */

11 public interface IndexedGetterMonitor {
12   /**
13    * This method is called right before the getter is called.
14    * @param obj the java bean object.
15    * @param desc the descriptor for the property.
16    * @param ind the index.
17    */

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

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

36   void propertyGetFailed(Object JavaDoc obj, PropertyDescriptor JavaDoc desc, int ind,
37           Throwable JavaDoc err, long duration);
38 }
39
Popular Tags