org.openejb.client
Interface ProxyFactory

All Known Implementing Classes:
CgLibProxyFactory

public interface ProxyFactory

Allows us to implement different versions of Proxies

Since:
11/25/2001

Method Summary
 InvocationHandler getInvocationHandler(Object proxy)
          Returns the invocation handler for the specified proxy instance.
 void init(Properties props)
          Prepares the ProxyFactory for use.
 boolean isProxyClass(Class cl)
          Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method.
 Object newProxyInstance(Class[] interfaces, InvocationHandler h, ClassLoader classLoader)
          Returns an instance of a proxy class for the specified interface that dispatches method invocations to the specified invocation handler.
 Object newProxyInstance(Class superClass, Class[] interfaces, InvocationHandler h, ClassLoader classLoader)
           
 

Method Detail

init

public void init(Properties props)
Prepares the ProxyFactory for use. Called once right after the ProxyFactory is instantiated.


getInvocationHandler

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

Throws:
IllegalArgumentException

isProxyClass

public boolean isProxyClass(Class cl)
Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method.


newProxyInstance

public Object newProxyInstance(Class[] interfaces,
                               InvocationHandler h,
                               ClassLoader classLoader)
                        throws IllegalArgumentException
Returns an instance of a proxy class for the specified interface that dispatches method invocations to the specified invocation handler.

Throws:
IllegalArgumentException

newProxyInstance

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


Copyright © 1999-2005 OpenEJB. All Rights Reserved.