org.apache.examples.impl
Class ProxyLoggingInvocationHandler

java.lang.Object
  extended by org.apache.examples.impl.ProxyLoggingInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class ProxyLoggingInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

An invocation handler used by ProxyLoggingInterceptorFactory. Logs all method invocations, return values and exceptions. Note that, unlike the real LoggingInterceptor, toString() will just pass through to the delegate service object (typically, the core service implementation).

Author:
Howard Lewis Ship

Constructor Summary
ProxyLoggingInvocationHandler(org.apache.commons.logging.Log log, java.lang.Object delegate)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyLoggingInvocationHandler

public ProxyLoggingInvocationHandler(org.apache.commons.logging.Log log,
                                     java.lang.Object delegate)
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable