org.openejb.util.proxy
Interface ProxyFactory

All Known Implementing Classes:
Jdk13ProxyFactory

public interface ProxyFactory


Method Summary
 InvocationHandler getInvocationHandler(Object proxy)
          Returns the invocation handler for the specified proxy instance.
 Class getProxyClass(Class interfce)
          Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
 Class getProxyClass(Class[] interfaces)
          Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
 void init(Properties props)
           
 boolean isProxyClass(Class cl)
           
 Object newProxyInstance(Class proxyClass)
          Returns a new proxy instance from the specified proxy class.
 Object newProxyInstance(Class[] interfaces, InvocationHandler h)
           
 Object newProxyInstance(Class interfce, InvocationHandler h)
           
 Object setInvocationHandler(Object proxy, InvocationHandler handler)
          Sets the invocation handler for the specified proxy instance.
 

Method Detail

init

public void init(Properties props)
          throws OpenEJBException
Throws:
OpenEJBException

getInvocationHandler

public InvocationHandler getInvocationHandler(Object proxy)
                                       throws IllegalArgumentException
Returns the invocation handler for the specified proxy instance.

Throws:
IllegalArgumentException

setInvocationHandler

public Object setInvocationHandler(Object proxy,
                                   InvocationHandler handler)
                            throws IllegalArgumentException
Sets the invocation handler for the specified proxy instance.

Throws:
IllegalArgumentException

getProxyClass

public Class getProxyClass(Class interfce)
                    throws IllegalArgumentException
Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.

Throws:
IllegalArgumentException

getProxyClass

public Class getProxyClass(Class[] interfaces)
                    throws IllegalArgumentException
Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.

Throws:
IllegalArgumentException

isProxyClass

public boolean isProxyClass(Class cl)

newProxyInstance

public Object newProxyInstance(Class interfce,
                               InvocationHandler h)
                        throws IllegalArgumentException
Throws:
IllegalArgumentException

newProxyInstance

public Object newProxyInstance(Class[] interfaces,
                               InvocationHandler h)
                        throws IllegalArgumentException
Throws:
IllegalArgumentException

newProxyInstance

public Object newProxyInstance(Class proxyClass)
                        throws IllegalArgumentException
Returns a new proxy instance from the specified proxy class. The interface(s) implemented by the proxy instance are determined by the proxy class. The class name may or may not be meaningful, depending on the implementation.

Throws:
IllegalArgumentException - Occurs when the specified class is not a proxy class.


Copyright © 1999-2007 OpenEJB. All Rights Reserved.