Examples of ServletInfo


Examples of com.googlecode.psiprobe.model.ServletInfo

        for (Iterator i = ctxs.iterator(); i.hasNext();) {
            Context ctx = (Context) i.next();
            if (ctx != null) {
                List appServlets = ApplicationUtils.getApplicationServlets(ctx);
                for (Iterator j = appServlets.iterator(); j.hasNext();) {
                    ServletInfo svlt = (ServletInfo) j.next();
                    Collections.sort(svlt.getMappings());
                }
                servlets.addAll(appServlets);
            }
        }
View Full Code Here

Examples of com.googlecode.psiprobe.model.ServletInfo

            return null;
        }
    }

    private static ServletInfo getServletInfo(Wrapper w, String contextName) {
        ServletInfo si = new ServletInfo();
        si.setApplicationName(contextName.length() > 0 ? contextName : "/");
        si.setServletName(w.getName());
        si.setServletClass(w.getServletClass());
        si.setAvailable(! w.isUnavailable());
        si.setLoadOnStartup(w.getLoadOnStartup());
        si.setRunAs(w.getRunAs());
        String[] ms = w.findMappings();
        for (int i = 0; i < ms.length; i++) {
            si.getMappings().add(ms[i]);
        }
        if (w instanceof StandardWrapper) {
            StandardWrapper sw = (StandardWrapper) w;
            si.setAllocationCount(sw.getCountAllocated());
            si.setErrorCount(sw.getErrorCount());
            si.setLoadTime(sw.getLoadTime());
            si.setMaxInstances(sw.getMaxInstances());
            si.setMaxTime(sw.getMaxTime());
            si.setMinTime(sw.getMinTime() == Long.MAX_VALUE ? 0 : sw.getMinTime());
            si.setProcessingTime(sw.getProcessingTime());
            si.setRequestCount(sw.getRequestCount());
            si.setSingleThreaded(sw.isSingleThreadModel());
        }
        return si;
    }
View Full Code Here

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);
            ServletHandler handler = deployment.getServlets().addServlet(servlet);
            return new ServletRegistrationImpl(servlet, handler.getManagedServlet(), deployment);
        } catch (ClassNotFoundException e) {
View Full Code Here

Examples of io.undertow.servlet.api.ServletInfo

            }
        }
        ServletHandler managedDefaultServlet = servlets.getServletHandler(DEFAULT_SERVLET_NAME);
        if(managedDefaultServlet == null) {
            //we always create a default servlet, even if it is not going to have any path mappings registered
            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("/*");
 
View Full Code Here

Examples of io.undertow.servlet.api.ServletInfo

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

Examples of io.undertow.servlet.api.ServletInfo

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

Examples of io.undertow.servlet.api.ServletInfo

            }
        }
        //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

Examples of io.undertow.servlet.api.ServletInfo

     * @param name         The servlet name
     * @param servletClass The servlet class
     * @return A new servlet description
     */
    public static ServletInfo servlet(final String name, final Class<? extends Servlet> servletClass) {
        return new ServletInfo(name, servletClass);
    }
View Full Code Here

Examples of io.undertow.servlet.api.ServletInfo

     * @param name         The servlet name
     * @param servletClass The servlet class
     * @return A new servlet description
     */
    public static ServletInfo servlet(final String name, final Class<? extends Servlet> servletClass, final InstanceFactory<? extends Servlet> servlet) {
        return new ServletInfo(name, servletClass, servlet);
    }
View Full Code Here

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
TOP
Copyright © 2018 www.massapi.com. 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.