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

void init(Properties props)
          throws OpenEJBException
Throws:
OpenEJBException

getInvocationHandler

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

Throws:
IllegalArgumentException

setInvocationHandler

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

Throws:
IllegalArgumentException

getProxyClass

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

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

boolean isProxyClass(Class cl)

newProxyInstance

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

newProxyInstance

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

newProxyInstance

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-2008 OpenEJB. All Rights Reserved.