io.undertow.servlet.api.ServletContainerInitializerInfo Java Examples
The following examples show how to use
io.undertow.servlet.api.ServletContainerInitializerInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServletContextListenerTestCase.java From quarkus-http with Apache License 2.0 | 6 votes |
@BeforeClass public static void setup() throws ServletException { final PathHandler root = new PathHandler(); final ServletContainer container = ServletContainer.Factory.newInstance(); DeploymentInfo builder = new DeploymentInfo() .setClassLoader(SimpleServletTestCase.class.getClassLoader()) .setContextPath("/servletContext") .setClassIntrospecter(TestClassIntrospector.INSTANCE) .setDeploymentName("servletContext.war") .addServletContainerInitializer(new ServletContainerInitializerInfo(TestSci.class, Collections.<Class<?>>emptySet())) .addServlet( new ServletInfo("servlet", MessageServlet.class) .addMapping("/aa") ) .addListener(new ListenerInfo(ServletContextTestListener.class)); manager = container.addDeployment(builder); manager.deploy(); root.addPrefixPath(builder.getContextPath(), manager.start()); DefaultServer.setRootHandler(root); }
Example #2
Source File: UndertowWebServer.java From oxygen with Apache License 2.0 | 5 votes |
private DeploymentManager deployment() { Set<Class<?>> handlesTypes = new HashSet<>(2); return Servlets.defaultContainer().addDeployment( Servlets.deployment().setClassLoader(ClassUtils.getDefaultClassLoader()) .setContextPath(contextPath).setDeploymentName("oxygen") .addServletContainerInitializer( new ServletContainerInitializerInfo(ServletWebInitializer.class, handlesTypes))); }
Example #3
Source File: UndertowDeploymentRecorder.java From quarkus with Apache License 2.0 | 4 votes |
public void addServletContainerInitializer(RuntimeValue<DeploymentInfo> deployment, Class<? extends ServletContainerInitializer> sciClass, Set<Class<?>> handlesTypes) { deployment.getValue().addServletContainerInitializer(new ServletContainerInitializerInfo(sciClass, handlesTypes)); }
Example #4
Source File: DeploymentManagerFactory.java From seed with Mozilla Public License 2.0 | 4 votes |
private <T extends ServletContainerInitializer> ServletContainerInitializerInfo createServletContainerInitializerInfo( final T servletContainerInitializer) { return new ServletContainerInitializerInfo(servletContainerInitializer.getClass(), () -> new ImmediateInstanceHandle<>(servletContainerInitializer), null); }