org.jboss.web.tomcat.service.session.distributedcache.spi
Class DistributedCacheManagerFactoryFactory

java.lang.Object
  extended by org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactoryFactory

public class DistributedCacheManagerFactoryFactory
extends Object

Factory for obtaining a DistributedCacheManagerFactory.

Author:
Brian Stansberry

Field Summary
static String DEFAULT_CLASS_NAME
          Default name of the class that getDistributedCacheManagerFactory() will try to instantiate if no factory is injected.
 
Method Summary
 DistributedCacheManagerFactory getDistributedCacheManagerFactory()
          Returns the factory, creating one if necessary by loading the factory class and invoking Class.newInstance().
 String getFactoryClassName()
          Gets the class name of the factory; either the name of any existing factory, a class name injected via this property's setter, or DEFAULT_CLASS_NAME.
static DistributedCacheManagerFactoryFactory getInstance()
          Gets the singleton instance.
 TomcatClusterDistributedCacheManagerFactory getTomcatClusterDistributedCacheManagerFactory(TomcatClusterConfig config)
           
 void setDistributedCacheManagerFactory(DistributedCacheManagerFactory distributedCacheManagerFactory)
          Allows injection of the DistributedCacheManagerFactory.
 void setFactoryClassName(String factoryClassName)
          Allows injection of the factory class name.
 void setTomcatClusterDistributedCacheManagerFactory(TomcatClusterConfig config, TomcatClusterDistributedCacheManagerFactory factory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CLASS_NAME

public static final String DEFAULT_CLASS_NAME
Default name of the class that getDistributedCacheManagerFactory() will try to instantiate if no factory is injected.

See Also:
Constant Field Values
Method Detail

getInstance

public static final DistributedCacheManagerFactoryFactory getInstance()
Gets the singleton instance.


getDistributedCacheManagerFactory

public DistributedCacheManagerFactory getDistributedCacheManagerFactory()
                                                                 throws ClusteringNotSupportedException
Returns the factory, creating one if necessary by loading the factory class and invoking Class.newInstance().

Returns:
the factory. Will not return null.
Throws:
ClusteringNotSupportedException - if there is a problem instantiating a factory

setDistributedCacheManagerFactory

public void setDistributedCacheManagerFactory(DistributedCacheManagerFactory distributedCacheManagerFactory)
Allows injection of the DistributedCacheManagerFactory.

Parameters:
distributedCacheManagerFactory - the factory.

getTomcatClusterDistributedCacheManagerFactory

public TomcatClusterDistributedCacheManagerFactory getTomcatClusterDistributedCacheManagerFactory(TomcatClusterConfig config)
                                                                                           throws ClusteringNotSupportedException
Throws:
ClusteringNotSupportedException

setTomcatClusterDistributedCacheManagerFactory

public void setTomcatClusterDistributedCacheManagerFactory(TomcatClusterConfig config,
                                                           TomcatClusterDistributedCacheManagerFactory factory)

getFactoryClassName

public String getFactoryClassName()
Gets the class name of the factory; either the name of any existing factory, a class name injected via this property's setter, or DEFAULT_CLASS_NAME.

Returns:
the factory class name; will not return null

setFactoryClassName

public void setFactoryClassName(String factoryClassName)
Allows injection of the factory class name.

Parameters:
factoryClassName - Fully qualified name of a class that implements DistributedCacheManagerFactory and exposes a public no-arg constructor.


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