org.apache.commons.proxy.invoker
Class InvocationHandlerAdapter

java.lang.Object
  extended by org.apache.commons.proxy.invoker.InvocationHandlerAdapter
All Implemented Interfaces:
Invoker

public class InvocationHandlerAdapter
extends Object
implements Invoker

An adapter class to adapt the JDK's InvocationHandler interface to Commons Proxy's Invoker interface.

Since:
1.0
Author:
James Carman

Constructor Summary
InvocationHandlerAdapter(InvocationHandler invocationHandler)
           
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] arguments)
          "Invokes" the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationHandlerAdapter

public InvocationHandlerAdapter(InvocationHandler invocationHandler)
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] arguments)
              throws Throwable
Description copied from interface: Invoker
"Invokes" the method. Implementation should throw a InvokerException if problems arise while trying to invoke the method.

Specified by:
invoke in interface Invoker
Parameters:
proxy - the proxy object
method - the method being invoked
arguments - the arguments
Returns:
the return value
Throws:
Throwable - thrown by the implementation


Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.