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-levelAbstractServlet
which 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
-
-
Constructor Summary
Constructors Constructor Description Bootstrapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent sce)
void
contextInitialized(javax.servlet.ServletContextEvent event)
abstract ConfigurationLoader
getConfigurationLoader(javax.servlet.ServletContext servletContext)
abstract ConfigurationLoader
getConfigurationLoader(org.apache.commons.configuration.tree.ConfigurationNode node)
abstract Initialization
getInitialization()
-
-
-
Method Detail
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
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
-
getInitialization
public abstract Initialization getInitialization()
-
-