org.apache.webbeans.proxy
Class JavassistProxyFactory

java.lang.Object
  extended by org.apache.webbeans.proxy.JavassistProxyFactory

public final class JavassistProxyFactory
extends Object


Constructor Summary
JavassistProxyFactory()
           
 
Method Summary
 void clear()
           
 Class<?> createAbstractDecoratorProxyClass(OwbBean<?> bean)
           
 Object createBuildInBeanProxy(OwbBean<?> bean)
           
 Object createDependentScopedBeanProxy(OwbBean<?> bean, Object actualInstance, javax.enterprise.context.spi.CreationalContext<?> creastionalContext)
           
 Object createNormalScopedBeanProxy(OwbBean<?> bean, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
           
 javassist.util.proxy.ProxyFactory createProxyFactory(javax.enterprise.inject.spi.Bean<?> bean)
           
 Class<?> defineEjbBeanProxyClass(OwbBean<?> bean, Class<?> iface, javassist.util.proxy.ProxyFactory factory)
          Defines the proxy for the given bean and iface using callers factory.
 Class<?> getEjbBeanProxyClass(OwbBean<?> bean, Class<?> iface)
          Provides the proxy for the given bean and interface, if defined
static JavassistProxyFactory getInstance()
          Deprecated. 
 Map<OwbBean<?>,Class<?>> getInterceptorProxyClasses()
           
 Class<?> getProxyClass(javassist.util.proxy.ProxyFactory factory)
           
 Class<?> getResourceBeanProxyClass(ResourceBean<?,?> resourceBean)
           
static boolean isProxyInstance(Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavassistProxyFactory

public JavassistProxyFactory()
Method Detail

getInterceptorProxyClasses

public Map<OwbBean<?>,Class<?>> getInterceptorProxyClasses()

getInstance

@Deprecated
public static JavassistProxyFactory getInstance()
Deprecated. 


clear

public void clear()

getEjbBeanProxyClass

public Class<?> getEjbBeanProxyClass(OwbBean<?> bean,
                                     Class<?> iface)
Provides the proxy for the given bean and interface, if defined

Parameters:
bean - the contextual representing the EJB
iface - the injected business local interface
Returns:
the proxy Class if one has been defined, else null

getResourceBeanProxyClass

public Class<?> getResourceBeanProxyClass(ResourceBean<?,?> resourceBean)

defineEjbBeanProxyClass

public Class<?> defineEjbBeanProxyClass(OwbBean<?> bean,
                                        Class<?> iface,
                                        javassist.util.proxy.ProxyFactory factory)
Defines the proxy for the given bean and iface using callers factory. Due to races with the concurrentmap, this might sometimes create additional javassist-defined classes that are not used by the caller and not stored in the map. Synchronizing the entire method, and getEjbBeanProxyClass, on ejbProxyClasses is an alternative.

Parameters:
bean - the contextual representing the EJB
iface - the injected business local interface
factory -
Returns:

createAbstractDecoratorProxyClass

public Class<?> createAbstractDecoratorProxyClass(OwbBean<?> bean)

createNormalScopedBeanProxy

public Object createNormalScopedBeanProxy(OwbBean<?> bean,
                                          javax.enterprise.context.spi.CreationalContext<?> creationalContext)

createBuildInBeanProxy

public Object createBuildInBeanProxy(OwbBean<?> bean)

createDependentScopedBeanProxy

public Object createDependentScopedBeanProxy(OwbBean<?> bean,
                                             Object actualInstance,
                                             javax.enterprise.context.spi.CreationalContext<?> creastionalContext)

getProxyClass

public Class<?> getProxyClass(javassist.util.proxy.ProxyFactory factory)

createProxyFactory

public javassist.util.proxy.ProxyFactory createProxyFactory(javax.enterprise.inject.spi.Bean<?> bean)
                                                     throws Exception
Throws:
Exception

isProxyInstance

public static boolean isProxyInstance(Object o)
Parameters:
o - the object to check
Returns:
true if the given object is a proxy


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.