Class ContainerInitializer.ServletContainerInitializerServletContextListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ServletContextListener
    Enclosing class:
    ContainerInitializer

    public static class ContainerInitializer.ServletContainerInitializerServletContextListener
    extends java.lang.Object
    implements javax.servlet.ServletContextListener
    • Constructor Detail

      • ServletContainerInitializerServletContextListener

        public ServletContainerInitializerServletContextListener​(javax.servlet.ServletContainerInitializer sci)
    • Method Detail

      • afterStartup

        public ContainerInitializer.ServletContainerInitializerServletContextListener afterStartup​(java.util.function.Consumer<javax.servlet.ServletContext> consumer)
        Add a optional consumer to execute once the ServletContainerInitializer.onStartup(Set, ServletContext) has been called successfully.

        This would be for actions to perform on a ServletContext once this specific SCI has completed its execution. Actions that would require specific configurations that the SCI provides to be present on the ServletContext to function properly.

        This consumer is typically used for Embedded Jetty users to configure Jetty for their specific needs.

        Parameters:
        consumer - the consumer to execute after the SCI has executed
        Returns:
        this configured ContainerInitializer.ServletContainerInitializerServletContextListener instance.
      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • getClasses

        public java.util.Set<java.lang.Class<?>> getClasses()
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener