org.oddjob.framework
Class DefaultInvocationHandler

java.lang.Object
  extended by org.oddjob.framework.DefaultInvocationHandler
All Implemented Interfaces:
Serializable, InvocationHandler, WrapperInvocationHandler

public class DefaultInvocationHandler
extends Object
implements WrapperInvocationHandler, Serializable

Default invocation handler for Proxies for wrapped components.

See Also:
Serialized Form
Author:
rob

Constructor Summary
DefaultInvocationHandler()
           
 
Method Summary
 Object getWrappedComponent()
          Get the wrapped component.
 void initialise(ComponentWrapper wrapper, Class<?>[] wrappingInterfaces, Object wrapped, Class<?>[] wrappedInterfaces)
          Initialise the invocation handler.
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInvocationHandler

public DefaultInvocationHandler()
Method Detail

initialise

public void initialise(ComponentWrapper wrapper,
                       Class<?>[] wrappingInterfaces,
                       Object wrapped,
                       Class<?>[] wrappedInterfaces)
Initialise the invocation handler.

Parameters:
wrapper - The wrapper. Handles invocations for wrapping interfaces.
wrappingInterfaces - The wrapping interfaces.
wrapped - The component.
wrappedInterfaces - The component interfaces.

getWrappedComponent

public Object getWrappedComponent()
Description copied from interface: WrapperInvocationHandler
Get the wrapped component.

Specified by:
getWrappedComponent in interface WrapperInvocationHandler
Returns:
Must not be null.

invoke

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