Class 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 by getConfigurationLoader(javax.servlet.ServletContext) and this will in turn stick it into your servlets (by putting it in the environment for the top-level AbstractServlet 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

    • Field Detail

      • useCF

        protected boolean useCF
        Toggles using new (CF) configurations or sticks with the old Apache.
    • Constructor Detail

      • Bootstrapper

        public Bootstrapper()
    • Method Detail

      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextDestroyed in interface javax.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:
        contextInitialized in interface javax.servlet.ServletContextListener
        Parameters:
        event -
      • getInitialization

        public abstract Initialization getInitialization()