Class ContainerInitializer
java.lang.Object
org.eclipse.jetty.servlet.listener.ContainerInitializer
Utility Methods for manual execution of
ServletContainerInitializer
when
using Embedded Jetty.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasContextListener
(jakarta.servlet.ServletContainerInitializer sci) Utility Method to allow for manual execution ofServletContainerInitializer
when using Embedded Jetty.
-
Constructor Details
-
ContainerInitializer
public ContainerInitializer()
-
-
Method Details
-
asContextListener
public static ContainerInitializer.ServletContainerInitializerServletContextListener asContextListener(jakarta.servlet.ServletContainerInitializer sci) Utility Method to allow for manual execution ofServletContainerInitializer
when using Embedded Jetty.ServletContextHandler context = new ServletContextHandler(); ServletContainerInitializer corpSci = new MyCorporateSCI(); context.addEventListener(ContainerInitializer.asContextListener(corpSci));
The
ServletContainerInitializer
will have itsServletContainerInitializer.onStartup(Set, ServletContext)
method called with the manually configured list ofSet<Class<?>> c
set. In other words, this usage does not perform bytecode or annotation scanning against the classes in yourServletContextHandler
orWebAppContext
.- Parameters:
sci
- theServletContainerInitializer
to call- Returns:
- the
ServletContextListener
wrapping the SCI - See Also:
-