Holger's
Java API

com.antelmann.util
Class InterfaceMonitor.IMLogger

java.lang.Object
  extended by com.antelmann.util.InterfaceMonitor.Adapter
      extended by com.antelmann.util.InterfaceMonitor.IMLogger
All Implemented Interfaces:
InterfaceMonitor
Enclosing interface:
InterfaceMonitor

public static class InterfaceMonitor.IMLogger
extends InterfaceMonitor.Adapter

a convenience class that simply logs all access to an interface


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.antelmann.util.InterfaceMonitor
InterfaceMonitor.Adapter, InterfaceMonitor.IMLogger, InterfaceMonitor.Profiler
 
Constructor Summary
InterfaceMonitor.IMLogger(Logger logger)
           
InterfaceMonitor.IMLogger(Logger logger, Level level)
           
 
Method Summary
 void methodInvoked(Object object, Method method, Object[] args, long timeTaken, Object returnValue, Throwable throwable)
          called after the given method on the given object with the given arguments has been executed.
 
Methods inherited from class com.antelmann.util.InterfaceMonitor.Adapter
prepareInvocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterfaceMonitor.IMLogger

public InterfaceMonitor.IMLogger(Logger logger)

InterfaceMonitor.IMLogger

public InterfaceMonitor.IMLogger(Logger logger,
                                 Level level)
Method Detail

methodInvoked

public void methodInvoked(Object object,
                          Method method,
                          Object[] args,
                          long timeTaken,
                          Object returnValue,
                          Throwable throwable)
Description copied from interface: InterfaceMonitor
called after the given method on the given object with the given arguments has been executed. Of the last two arguments, one is always null while the other contains a value. Note that this method is synchronously called before the return value (or the exception to be thrown) is passed to the caller of the proxy object.

Specified by:
methodInvoked in interface InterfaceMonitor
Overrides:
methodInvoked in class InterfaceMonitor.Adapter
Parameters:
object - the original object that the given method was invoked on
method - the method that was executed on the given object
args - the arguments that were used for the given method call (may be null)
timeTaken - the time it took to execute the given method in milliseconds
returnValue - the value returned by the given method call (if no exception was thrown; otherwise null)
throwable - contains the exception thrown by the given method call (if any); if the Throwable is null, the returnValue is not and vice versa.


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads