org.shiftone.exq.impl.util
Class LoggingInvocationHandler

java.lang.Object
  extended byorg.shiftone.exq.impl.util.LoggingInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler, java.io.Serializable

public class LoggingInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler, java.io.Serializable

Class LoggingInvocationHandler

Author:
Jeff Drost
See Also:
Serialized Form

Constructor Summary
LoggingInvocationHandler(java.lang.Object target, java.lang.Class iface)
          Warning it is assumed that the dynamic proxy that this InvocationHandler is used by will not implement more interfaces than the target object implements.
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          handle invocations of the proxy object, and forward them to the target object, logging along the way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingInvocationHandler

public LoggingInvocationHandler(java.lang.Object target,
                                java.lang.Class iface)
Warning it is assumed that the dynamic proxy that this InvocationHandler is used by will not implement more interfaces than the target object implements. When a method is called on the proxy, that same method will be invoked on the target object. If the target object doesn't implement the method that is called on the proxy, an exception will be thrown.

Parameters:
target -
iface -
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
handle invocations of the proxy object, and forward them to the target object, logging along the way.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy -
method -
args -
Throws:
java.lang.Throwable