Package edu.uiuc.ncsa.security.servlet
Class Bootstrapper
- java.lang.Object
-
- edu.uiuc.ncsa.security.servlet.Bootstrapper
-
- All Implemented Interfaces:
EventListener,javax.servlet.ServletContextListener
- Direct Known Subclasses:
SASBootstrapper
public abstract class Bootstrapper extends Object implements javax.servlet.ServletContextListener
This class controls the loading of the correct boot strapper, which in turn is charged with translating the configuration into usable objects. This should be set as a context listener in your web.xml. A Typical entry looks like this:
<listener>
<listener-class>full.pack.age.name.to.MyBootstrapper</listener-class>
</listener>
Simply supply an instance of the your bootstrapper, returned bygetConfigurationLoader(javax.servlet.ServletContext)and this will in turn stick it into your servlets (by putting it in the environment for the top-levelAbstractServletwhich everything should inherit from. Note that this is designed for a single use in a web application. The environment will be static and shared by all the servlets in a single web application.Created by Jeff Gaynor
on 3/21/12 at 10:59 AM
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanuseCFToggles using new (CF) configurations or sticks with the old Apache.
-
Constructor Summary
Constructors Constructor Description Bootstrapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(javax.servlet.ServletContextEvent sce)voidcontextInitialized(javax.servlet.ServletContextEvent event)Entry point for this class.abstract ConfigurationLoadergetConfigurationLoader(CFNode node)abstract ConfigurationLoadergetConfigurationLoader(javax.servlet.ServletContext servletContext)abstract ConfigurationLoadergetConfigurationLoader(org.apache.commons.configuration.tree.ConfigurationNode node)abstract InitializationgetInitialization()booleanisUseCF()voidsetUseCF(boolean useCF)
-
-
-
Method Detail
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-
isUseCF
public boolean isUseCF()
-
setUseCF
public void setUseCF(boolean useCF)
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
Entry point for this class. The web server calls (once) this when the system starts.- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener- Parameters:
event-
-
getConfigurationLoader
public abstract ConfigurationLoader getConfigurationLoader(javax.servlet.ServletContext servletContext) throws Exception
- Throws:
Exception
-
getConfigurationLoader
public abstract ConfigurationLoader getConfigurationLoader(org.apache.commons.configuration.tree.ConfigurationNode node) throws MyConfigurationException
- Throws:
MyConfigurationException
-
getConfigurationLoader
public abstract ConfigurationLoader getConfigurationLoader(CFNode node) throws MyConfigurationException
- Throws:
MyConfigurationException
-
getInitialization
public abstract Initialization getInitialization()
-
-