jfun.yan.monitoring
Class NopComponentMonitor

java.lang.Object
  extended by jfun.yan.monitoring.NopComponentMonitor
All Implemented Interfaces:
ComponentMonitor, CtorMonitor, GetterMonitor, IndexedGetterMonitor, IndexedSetterMonitor, MethodMonitor, SetterMonitor

public class NopComponentMonitor
extends java.lang.Object
implements ComponentMonitor

This class provides empty implementation for ComponentMonitor. It can be used as a base class so that subclass can override only the events of interest.

Author:
Michelle Lei

Constructor Summary
NopComponentMonitor()
           
 
Method Summary
 void constructed(java.lang.reflect.Constructor ctor, java.lang.Object[] args, java.lang.Object instance, long duration)
          This method is called right after the constructor is invoked successfully.
 void constructing(java.lang.reflect.Constructor ctor, java.lang.Object[] args)
          This method is called right before the constructor is invoked.
 void constructionFailed(java.lang.reflect.Constructor ctor, java.lang.Object[] args, java.lang.Throwable e, long duration)
          This method is called after the constructor failed.
 void invocationFailed(java.lang.Object obj, java.lang.reflect.Method mtd, java.lang.Object[] args, java.lang.Throwable err, long duration)
          This method is called after the target method failed.
 void invoked(java.lang.Object obj, java.lang.reflect.Method mtd, java.lang.Object[] args, java.lang.Object result, long duration)
          This method is called after the target method is successfully executed.
 void invoking(java.lang.Object obj, java.lang.reflect.Method mtd, java.lang.Object[] args)
          This method is called right before the target method is invoked.
 void propertyGetFailed(java.lang.Object obj, java.beans.PropertyDescriptor desc, int ind, java.lang.Throwable err, long duration)
          This method is called after the getter failed.
 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 propertyGetting(java.lang.Object obj, java.beans.PropertyDescriptor desc, int ind)
          This method is called right before the getter is called.
 void propertyGot(java.lang.Object obj, java.beans.PropertyDescriptor desc, int ind, java.lang.Object val, long duration)
          This method is called after the getter is called successfully.
 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.
 void propertySet(java.lang.Object obj, java.beans.PropertyDescriptor desc, int ind, java.lang.Object val, long duration)
          This method is called after the setter is called successfully.
 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, int ind, java.lang.Object val, java.lang.Throwable err, long duration)
          This method is called after the setter failed.
 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, int ind, java.lang.Object val)
          This method is called right before the setter is called.
 void propertySetting(java.lang.Object obj, java.beans.PropertyDescriptor desc, java.lang.Object val)
          This method is called right before the setter is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NopComponentMonitor

public NopComponentMonitor()
Method Detail

invocationFailed

public void invocationFailed(java.lang.Object obj,
                             java.lang.reflect.Method mtd,
                             java.lang.Object[] args,
                             java.lang.Throwable err,
                             long duration)
Description copied from interface: MethodMonitor
This method is called after the target method failed.

Specified by:
invocationFailed in interface MethodMonitor
Parameters:
obj - the object to which the target method belongs.
mtd - the target method.
args - the arguments passed to the target method.
err - the exception thrown out from the target method.
duration - exactly how long it took to execute the target method. (in milliseconds)

invoked

public void invoked(java.lang.Object obj,
                    java.lang.reflect.Method mtd,
                    java.lang.Object[] args,
                    java.lang.Object result,
                    long duration)
Description copied from interface: MethodMonitor
This method is called after the target method is successfully executed.

Specified by:
invoked in interface MethodMonitor
Parameters:
obj - the object to which the target method belongs.
mtd - the target method.
args - the arguments passed to the target method.
result - the return value from the target method.
duration - exactly how long it took to execute the target method. (in milliseconds)

invoking

public void invoking(java.lang.Object obj,
                     java.lang.reflect.Method mtd,
                     java.lang.Object[] args)
Description copied from interface: MethodMonitor
This method is called right before the target method is invoked.

Specified by:
invoking in interface MethodMonitor
Parameters:
obj - the object to which the target method belongs.
mtd - the target method.
args - the arguments passed to the target method.

propertySet

public void propertySet(java.lang.Object obj,
                        java.beans.PropertyDescriptor desc,
                        java.lang.Object val,
                        long duration)
Description copied from interface: SetterMonitor
This method is called after the setter is called successfully.

Specified by:
propertySet in interface SetterMonitor
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

public void propertySetFailed(java.lang.Object obj,
                              java.beans.PropertyDescriptor desc,
                              java.lang.Object val,
                              java.lang.Throwable err,
                              long duration)
Description copied from interface: SetterMonitor
This method is called after the setter failed.

Specified by:
propertySetFailed in interface SetterMonitor
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)

propertySetting

public void propertySetting(java.lang.Object obj,
                            java.beans.PropertyDescriptor desc,
                            java.lang.Object val)
Description copied from interface: SetterMonitor
This method is called right before the setter is called.

Specified by:
propertySetting in interface SetterMonitor
Parameters:
obj - the java bean object.
desc - the descriptor for the property.
val - the property value to set.

propertyGetFailed

public void propertyGetFailed(java.lang.Object obj,
                              java.beans.PropertyDescriptor desc,
                              int ind,
                              java.lang.Throwable err,
                              long duration)
Description copied from interface: IndexedGetterMonitor
This method is called after the getter failed.

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

propertyGetting

public void propertyGetting(java.lang.Object obj,
                            java.beans.PropertyDescriptor desc,
                            int ind)
Description copied from interface: IndexedGetterMonitor
This method is called right before the getter is called.

Specified by:
propertyGetting in interface IndexedGetterMonitor
Parameters:
obj - the java bean object.
desc - the descriptor for the property.
ind - the index.

propertyGot

public void propertyGot(java.lang.Object obj,
                        java.beans.PropertyDescriptor desc,
                        int ind,
                        java.lang.Object val,
                        long duration)
Description copied from interface: IndexedGetterMonitor
This method is called after the getter is called successfully.

Specified by:
propertyGot in interface IndexedGetterMonitor
Parameters:
obj - the java bean object.
desc - the descriptor for the property.
ind - the index.
val - the property value.
duration - exactly how long it took to run the getter. (in milliseconds)

propertyGetFailed

public void propertyGetFailed(java.lang.Object obj,
                              java.beans.PropertyDescriptor desc,
                              java.lang.Throwable err,
                              long duration)
Description copied from interface: GetterMonitor
This method is called after the getter failed.

Specified by:
propertyGetFailed in interface GetterMonitor
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)

propertyGetting

public void propertyGetting(java.lang.Object obj,
                            java.beans.PropertyDescriptor desc)
Description copied from interface: GetterMonitor
This method is called right before the getter is called.

Specified by:
propertyGetting in interface GetterMonitor
Parameters:
obj - the java bean object.
desc - the descriptor for the property.

propertyGot

public void propertyGot(java.lang.Object obj,
                        java.beans.PropertyDescriptor desc,
                        java.lang.Object result,
                        long duration)
Description copied from interface: GetterMonitor
This method is called after the getter is called successfully.

Specified by:
propertyGot in interface GetterMonitor
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)

propertySet

public void propertySet(java.lang.Object obj,
                        java.beans.PropertyDescriptor desc,
                        int ind,
                        java.lang.Object val,
                        long duration)
Description copied from interface: IndexedSetterMonitor
This method is called after the setter is called successfully.

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

propertySetFailed

public void propertySetFailed(java.lang.Object obj,
                              java.beans.PropertyDescriptor desc,
                              int ind,
                              java.lang.Object val,
                              java.lang.Throwable err,
                              long duration)
Description copied from interface: IndexedSetterMonitor
This method is called after the setter failed.

Specified by:
propertySetFailed in interface IndexedSetterMonitor
Parameters:
obj - the java bean object.
desc - the descriptor for the property.
ind - the index.
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)

propertySetting

public void propertySetting(java.lang.Object obj,
                            java.beans.PropertyDescriptor desc,
                            int ind,
                            java.lang.Object val)
Description copied from interface: IndexedSetterMonitor
This method is called right before the setter is called.

Specified by:
propertySetting in interface IndexedSetterMonitor
Parameters:
obj - the java bean object.
desc - the descriptor for the property.
ind - the index.
val - the property value to set.

constructed

public void constructed(java.lang.reflect.Constructor ctor,
                        java.lang.Object[] args,
                        java.lang.Object instance,
                        long duration)
Description copied from interface: CtorMonitor
This method is called right after the constructor is invoked successfully.

Specified by:
constructed in interface CtorMonitor
Parameters:
ctor - the constructor.
args - the arguments passed to the constructor.
instance - the object created by the constructor.
duration - excactly how long the constructor execution takes. (in milliseconds)

constructing

public void constructing(java.lang.reflect.Constructor ctor,
                         java.lang.Object[] args)
Description copied from interface: CtorMonitor
This method is called right before the constructor is invoked.

Specified by:
constructing in interface CtorMonitor
Parameters:
ctor - the constructor to be called.
args - the arguments passed to the constructor.

constructionFailed

public void constructionFailed(java.lang.reflect.Constructor ctor,
                               java.lang.Object[] args,
                               java.lang.Throwable e,
                               long duration)
Description copied from interface: CtorMonitor
This method is called after the constructor failed.

Specified by:
constructionFailed in interface CtorMonitor
Parameters:
ctor - the constructor.
args - the arguments passed to the constructor.
e - the exception thrown out of the constructor.
duration - exactly how long the constructor execution takes. (in milliseconds)