Package io.undertow.servlet.api

Examples of io.undertow.servlet.api.ServletInfo


        ensureNotInitialized();
        try {
            if (deploymentInfo.getServlets().containsKey(servletName)) {
                return null;
            }
            ServletInfo servlet = new ServletInfo(servletName, (Class<? extends Servlet>) deploymentInfo.getClassLoader().loadClass(className));
            readServletAnnotations(servlet);
            deploymentInfo.addServlet(servlet);
            deployment.getServlets().addServlet(servlet);
            return new ServletRegistrationImpl(servlet, deployment);
        } catch (ClassNotFoundException e) {
View Full Code Here


        ensureNotProgramaticListener();
        ensureNotInitialized();
        if (deploymentInfo.getServlets().containsKey(servletName)) {
            return null;
        }
        ServletInfo s = new ServletInfo(servletName, servlet.getClass(), new ImmediateInstanceFactory<Servlet>(servlet));
        readServletAnnotations(s);
        deploymentInfo.addServlet(s);
        deployment.getServlets().addServlet(s);
        return new ServletRegistrationImpl(s, deployment);
    }
View Full Code Here

        ensureNotProgramaticListener();
        ensureNotInitialized();
        if (deploymentInfo.getServlets().containsKey(servletName)) {
            return null;
        }
        ServletInfo servlet = new ServletInfo(servletName, servletClass);
        readServletAnnotations(servlet);
        deploymentInfo.addServlet(servlet);
        deployment.getServlets().addServlet(servlet);
        return new ServletRegistrationImpl(servlet, deployment);
    }
View Full Code Here

    }

    @Override
    public ServletRegistration getServletRegistration(final String servletName) {
        ensureNotProgramaticListener();
        final ServletInfo servlet = deploymentInfo.getServlets().get(servletName);
        if (servlet == null) {
            return null;
        }
        return new ServletRegistrationImpl(servlet, deployment);
    }
View Full Code Here

            }
        }
        //we always create a default servlet, even if it is not going to have any path mappings registered
        final DefaultServletConfig config = deploymentInfo.getDefaultServletConfig() == null ? new DefaultServletConfig() : deploymentInfo.getDefaultServletConfig();
        DefaultServlet defaultInstance = new DefaultServlet(deployment, config, deploymentInfo.getWelcomePages());
        final ServletHandler managedDefaultServlet = servlets.addServlet(new ServletInfo(DEFAULT_SERVLET_NAME, DefaultServlet.class, new ImmediateInstanceFactory<Servlet>(defaultInstance)));

        if (defaultServlet == null) {
            //no explicit default servlet was specified, so we register our mapping
            pathMatches.add("/*");
            defaultServlet = managedDefaultServlet;
View Full Code Here

        ensureNotInitialized();
        try {
            if (deploymentInfo.getServlets().containsKey(servletName)) {
                return null;
            }
            ServletInfo servlet = new ServletInfo(servletName, (Class<? extends Servlet>) deploymentInfo.getClassLoader().loadClass(className));
            deploymentInfo.addServlet(servlet);
            deployment.getServlets().addServlet(servlet);
            return new ServletRegistrationImpl(servlet, deployment);
        } catch (ClassNotFoundException e) {
            throw UndertowServletMessages.MESSAGES.cannotLoadClass(className, e);
View Full Code Here

        ensureNotProgramaticListener();
        ensureNotInitialized();
        if (deploymentInfo.getServlets().containsKey(servletName)) {
            return null;
        }
        ServletInfo s = new ServletInfo(servletName, servlet.getClass(), new ImmediateInstanceFactory<Servlet>(servlet));
        deploymentInfo.addServlet(s);
        deployment.getServlets().addServlet(s);
        return new ServletRegistrationImpl(s, deployment);
    }
View Full Code Here

        ensureNotProgramaticListener();
        ensureNotInitialized();
        if (deploymentInfo.getServlets().containsKey(servletName)) {
            return null;
        }
        ServletInfo servlet = new ServletInfo(servletName, servletClass);
        deploymentInfo.addServlet(servlet);
        deployment.getServlets().addServlet(servlet);
        return new ServletRegistrationImpl(servlet, deployment);
    }
View Full Code Here

    }

    @Override
    public ServletRegistration getServletRegistration(final String servletName) {
        ensureNotProgramaticListener();
        final ServletInfo servlet = deploymentInfo.getServlets().get(servletName);
        if (servlet == null) {
            return null;
        }
        return new ServletRegistrationImpl(servlet, deployment);
    }
View Full Code Here

                    extensionServlets.put(ext, handler);
                }
            }
        }
        //we always create a default servlet, even if it is not going to have any path mappings registered
        final ServletHandler managedDefaultServlet = servlets.addServlet(new ServletInfo(DEFAULT_SERVLET_NAME, DefaultServlet.class));

        if (defaultServlet == null) {
            //no explicit default servlet was specified, so we register our mapping
            pathMatches.add("/*");
            defaultServlet = managedDefaultServlet;
View Full Code Here

TOP

Related Classes of io.undertow.servlet.api.ServletInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.