com.xenonsoft.bridgetown.soa.impl
Class ApplicationProxyBeanBuilder

java.lang.Object
  extended bycom.xenonsoft.bridgetown.soa.impl.ApplicationProxyBeanBuilder

public final class ApplicationProxyBeanBuilder
extends java.lang.Object

A singleton class that provides an application reference to a proxy bean builder instance.

Version:
$Id: ApplicationProxyBeanBuilder.java,v 1.3 2004/10/27 02:14:28 peter_pilgrim Exp $
Author:
peterp, 03-Oct-2004

Method Summary
 IProxyBeanBuilder createBuilder(java.lang.ClassLoader classLoader, java.lang.String providerName)
          Creates or retrieve a proxy bean builder.
 IProxyBeanBuilder createBuilder(java.lang.String providerName)
          Creates or retrieve a proxy bean builder using the current available class loader
static ApplicationProxyBeanBuilder getInstance()
          Retrieves the application proxy bean builder singleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ApplicationProxyBeanBuilder getInstance()
Retrieves the application proxy bean builder singleton

Returns:
the instance

createBuilder

public IProxyBeanBuilder createBuilder(java.lang.ClassLoader classLoader,
                                       java.lang.String providerName)
Creates or retrieve a proxy bean builder.

Depending on the provider name the factory current implementation returns the following:

DESIGN NOTE: This factory class will be changing to be a bit.
Peter Pilgrim Some of my ideas include, but not limited to:

  1. Configure from a public known system property
  2. Use the properties file e.g. "lib/bridgetown.properties" in the JRE directory.
  3. Use yet another XML configuration file.
  4. Use a delegation class to allow developer to specify how the bean builder is loaded.
  5. Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/com.xenonsoft.bridgetown.soa.impl.ApplicationProxyBeanBuilder in jars available to the runtime.

Some of these ideas are based on the XML API for SAXParser http://xml.apache.org/xalan-j/apidocs/javax/xml/parsers/SAXParser.html. Has SAXParser been a good example of successful extensible API?

Parameters:
classLoader - the supplied class loader
providerName - the provider name
Returns:
the proxy bean builder
Throws:
java.lang.IllegalArgumentException - provider name is empty or null
java.lang.RuntimeException - unknown the bean builder cannot be created.
See Also:
CglibProxyBeanBuilder, BeanUtilsProxyBeanBuilder

createBuilder

public IProxyBeanBuilder createBuilder(java.lang.String providerName)
Creates or retrieve a proxy bean builder using the current available class loader

Parameters:
providerName - the provider name
Returns:
the proxy bean builder
See Also:
createBuilder(ClassLoader, String)


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.