org.openejb.client.proxy
Class Jdk13InvocationHandler

java.lang.Object
  extended by org.openejb.client.proxy.Jdk13InvocationHandler
All Implemented Interfaces:
java.io.Serializable, java.lang.reflect.InvocationHandler

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

Implementation of JDK 1.3 InvocationHandler for JDK 1.3 Proxies. This only compiles on JDK 1.3 or better. This is the interface between the OpenEJB InvocationHandler and the JDK 1.3 proxy. It allows the OpenEJB InvocationHandler to be null or changed after proxy instantiation, which is not normally allowed for JDK 1.3 proxies.

Author:
Aaron Mulder (ammulder@alumni.princeton.edu)
See Also:
Serialized Form

Constructor Summary
Jdk13InvocationHandler()
          Constructs a new JDK 1.3 compatable InvocationHandler that delegates all invocations to an OpenEJB invocation handler.
Jdk13InvocationHandler(InvocationHandler delegate)
          Constructs a new JDK 1.3 compatable InvocationHandler that delegates all invocations to an OpenEJB invocation handler.
 
Method Summary
 InvocationHandler getInvocationHandler()
          Returns the InvocationHandler that will receive all the calls on the proxy
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Invoked by the proxy instance when one of its methods have been called.
 InvocationHandler setInvocationHandler(InvocationHandler handler)
          Sets the InvocationHandler that will receive all the calls on the proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jdk13InvocationHandler

public Jdk13InvocationHandler()
Constructs a new JDK 1.3 compatable InvocationHandler that delegates all invocations to an OpenEJB invocation handler.


Jdk13InvocationHandler

public Jdk13InvocationHandler(InvocationHandler delegate)
Constructs a new JDK 1.3 compatable InvocationHandler that delegates all invocations to an OpenEJB invocation handler.

Parameters:
delegate -
Method Detail

getInvocationHandler

public InvocationHandler getInvocationHandler()
Returns the InvocationHandler that will receive all the calls on the proxy

Returns:
InvocationHandler

setInvocationHandler

public InvocationHandler setInvocationHandler(InvocationHandler handler)
Sets the InvocationHandler that will receive all the calls on the proxy

Parameters:
handler -
Returns:
InvocationHandler

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invoked by the proxy instance when one of its methods have been called. The invocation is delegated to the OpenEJB invocation handler.

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


Copyright © 1999-2011 OpenEJB. All Rights Reserved.