org.jboss.kernel.spi.lazy
Class LazyProxyFactory

java.lang.Object
  extended by org.jboss.kernel.spi.lazy.LazyProxyFactory

public class LazyProxyFactory
extends Object

Create lazy proxy of a bean.

Author:
Ales Justin

Constructor Summary
LazyProxyFactory()
           
 
Method Summary
protected static LazyInitializer createInitializer(KernelConfigurator configurator, String initializerClassName)
          Create initializer instance.
protected static LazyInitializer getInitializer(KernelConfigurator configurator)
          Get the LazyInitializater instance.
static Object getProxy(Kernel kernel, String bean, boolean exposeClass, Set<String> interfaces)
          Create lazy proxy.
protected static boolean testLibExists(String className)
          Check if test class exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyProxyFactory

public LazyProxyFactory()
Method Detail

getInitializer

protected static LazyInitializer getInitializer(KernelConfigurator configurator)
Get the LazyInitializater instance.

Parameters:
configurator - the configurator
Returns:
initializer instance

testLibExists

protected static boolean testLibExists(String className)
Check if test class exists.

Parameters:
className - class name to test
Returns:
true if test successful, false otherwise

createInitializer

protected static LazyInitializer createInitializer(KernelConfigurator configurator,
                                                   String initializerClassName)
Create initializer instance.

Parameters:
configurator - the configurator
initializerClassName - initializer class name
Returns:
initializer instance or null if we fail

getProxy

public static Object getProxy(Kernel kernel,
                              String bean,
                              boolean exposeClass,
                              Set<String> interfaces)
                       throws Throwable
Create lazy proxy.

Parameters:
kernel - the kernel
bean - the bean to wrap
exposeClass - do we expose full class
interfaces - interfaces to expose
Returns:
the proxy
Throws:
Throwable - for any error


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.