public static class ContainerInitializer.ServletContainerInitializerServletContextListener extends java.lang.Object implements ServletContextListener
Constructor and Description |
---|
ServletContainerInitializerServletContextListener(ServletContainerInitializer sci) |
public ServletContainerInitializerServletContextListener(ServletContainerInitializer sci)
public ContainerInitializer.ServletContainerInitializerServletContextListener addClasses(java.lang.String... classNames)
ServletContainerInitializer.onStartup(Set, ServletContext)
call.
Note that these classes will be loaded using the context classloader for the ServletContext initialization phase.
classNames
- the class names to load and pass into the ServletContainerInitializer.onStartup(Set, ServletContext)
callContainerInitializer.ServletContainerInitializerServletContextListener
instance.public ContainerInitializer.ServletContainerInitializerServletContextListener addClasses(java.lang.Class<?>... classes)
ServletContainerInitializer.onStartup(Set, ServletContext)
call.
Note that these classes will exist on the classloader that was used to call this method.
If you want the classes to be loaded using the context classloader for the ServletContext
then use the String form of the classes via the addClasses(String...)
method.
classes
- the classes to pass into the ServletContainerInitializer.onStartup(Set, ServletContext)
callContainerInitializer.ServletContainerInitializerServletContextListener
instance.public ContainerInitializer.ServletContainerInitializerServletContextListener afterStartup(java.util.function.Consumer<ServletContext> consumer)
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.
consumer
- the consumer to execute after the SCI has executedContainerInitializer.ServletContainerInitializerServletContextListener
instance.public void contextInitialized(ServletContextEvent sce)
ServletContextListener
contextInitialized
in interface ServletContextListener
public java.util.Set<java.lang.Class<?>> getClasses()
public void contextDestroyed(ServletContextEvent sce)
ServletContextListener
contextDestroyed
in interface ServletContextListener
Copyright © 2010 - 2019 Adobe. All Rights Reserved