Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.faces
Class FactoryFinder  view FactoryFinder download FactoryFinder.java

java.lang.Object
  extended byjavax.faces.FactoryFinder

public final class FactoryFinder
extends java.lang.Object

Version:
$Revision: 278974 $ $Date: 2005-09-06 07:07:21 -0400 (Tue, 06 Sep 2005) $

Field Summary
private static java.util.Map _factories
          Maps from classLoader to another map, the container (i.e.
private static java.util.Map _registeredFactoryNames
           
private static java.util.Map ABSTRACT_FACTORY_CLASSES
           
static java.lang.String APPLICATION_FACTORY
           
static java.lang.String FACES_CONTEXT_FACTORY
           
static java.lang.String LIFECYCLE_FACTORY
           
static java.lang.String RENDER_KIT_FACTORY
           
private static java.util.Set VALID_FACTORY_NAMES
           
 
Constructor Summary
(package private) FactoryFinder()
           
 
Method Summary
private static void checkFactoryName(java.lang.String factoryName)
           
private static java.lang.ClassLoader getClassLoader()
           
static java.lang.Object getFactory(java.lang.String factoryName)
           
private static java.lang.Object newFactoryInstance(java.lang.Class interfaceClass, java.util.Iterator classNamesIterator, java.lang.ClassLoader classLoader)
           
static void releaseFactories()
           
static void setFactory(java.lang.String factoryName, java.lang.String implName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_FACTORY

public static final java.lang.String APPLICATION_FACTORY
See Also:
Constant Field Values

FACES_CONTEXT_FACTORY

public static final java.lang.String FACES_CONTEXT_FACTORY
See Also:
Constant Field Values

LIFECYCLE_FACTORY

public static final java.lang.String LIFECYCLE_FACTORY
See Also:
Constant Field Values

RENDER_KIT_FACTORY

public static final java.lang.String RENDER_KIT_FACTORY
See Also:
Constant Field Values

_registeredFactoryNames

private static java.util.Map _registeredFactoryNames

_factories

private static java.util.Map _factories
Maps from classLoader to another map, the container (i.e. Tomcat) will create a class loader for each web app that it controls (typically anyway) and that class loader is used as the key. The secondary map maps the factory name (i.e. FactoryFinder.APPLICATION_FACTORY) to actual instances that are created via getFactory. The instances will be of the class specified in the setFactory method for the factory name, i.e. FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY, MyFactory.class).


VALID_FACTORY_NAMES

private static final java.util.Set VALID_FACTORY_NAMES

ABSTRACT_FACTORY_CLASSES

private static final java.util.Map ABSTRACT_FACTORY_CLASSES
Constructor Detail

FactoryFinder

FactoryFinder()
Method Detail

getFactory

public static java.lang.Object getFactory(java.lang.String factoryName)
                                   throws FacesException

newFactoryInstance

private static java.lang.Object newFactoryInstance(java.lang.Class interfaceClass,
                                                   java.util.Iterator classNamesIterator,
                                                   java.lang.ClassLoader classLoader)

setFactory

public static void setFactory(java.lang.String factoryName,
                              java.lang.String implName)

releaseFactories

public static void releaseFactories()
                             throws FacesException

checkFactoryName

private static void checkFactoryName(java.lang.String factoryName)

getClassLoader

private static java.lang.ClassLoader getClassLoader()