Class ContainerInitializer
- java.lang.Object
-
- org.eclipse.jetty.servlet.listener.ContainerInitializer
-
public final class ContainerInitializer extends java.lang.Object
Utility Methods for manual execution ofServletContainerInitializer
when using Embedded Jetty.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContainerInitializer.ServletContainerInitializerServletContextListener
-
Constructor Summary
Constructors Constructor Description ContainerInitializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContainerInitializer.ServletContainerInitializerServletContextListener
asContextListener(javax.servlet.ServletContainerInitializer sci)
Utility Method to allow for manual execution ofServletContainerInitializer
when using Embedded Jetty.
-
-
-
Method Detail
-
asContextListener
public static ContainerInitializer.ServletContainerInitializerServletContextListener asContextListener(javax.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:
ContainerInitializer.ServletContainerInitializerServletContextListener.addClasses(Class[])
,ContainerInitializer.ServletContainerInitializerServletContextListener.addClasses(String...)
-
-