Package org.impalaframework.web.spring.integration

Examples of org.impalaframework.web.spring.integration.ServletFactoryBean


       
        context.refresh();
       
        Map<String,ServletFactoryBean> factoryBeans = context.getBeansOfType(ServletFactoryBean.class);
        assertEquals(1, factoryBeans.size());
        ServletFactoryBean firstValue = (ServletFactoryBean) ObjectMapUtils.getFirstValue(factoryBeans);
        assertTrue(firstValue.getObject() instanceof InternalModuleServlet);
    }
View Full Code Here


       
        context.refresh();
       
        Map<String,ServletFactoryBean> factoryBeans = context.getBeansOfType(ServletFactoryBean.class);
        assertEquals(1, factoryBeans.size());
        ServletFactoryBean firstValue = (ServletFactoryBean) ObjectMapUtils.getFirstValue(factoryBeans);
        final Object frameworkServlet = firstValue.getObject();
        assertTrue(frameworkServlet instanceof InternalFrameworkIntegrationServlet);
       
        InternalFrameworkIntegrationServlet integrationServlet = (InternalFrameworkIntegrationServlet) frameworkServlet;
        final DispatcherServlet dispatcherServlet = ReflectionUtils.getFieldValue(integrationServlet, "delegateServlet", DispatcherServlet.class);
       
View Full Code Here

                    suffixFiltersMapping.put(suffix, filterFactories);
                }
               
                String servletName = contributor.getServletName();
                if (servletName != null) {
                    ServletFactoryBean servletFactoryBean = servletsByName.get(servletName);
                    if (servletFactoryBean == null) {
                        throw new ConfigurationException("Suffix '" + suffix + "' has mapping for servlet '" + servletName + "' for which no named servlet definition is present in the current module.");
                    }
                    suffixServletMapping.put(suffix, servletFactoryBean);
                }
            }
        } else {     
            maybeDebug("Module '" + moduleName + "' has no contributions. Looking for servlet matching module name ...");
           
            //if no contributions, first look for servlet whose name is same as module name
            FilterFactoryBean filter = null;
            ServletFactoryBean servlet = servletsByName.get(this.moduleName);
           
            if (servlet == null) {

                maybeDebug("Looking for filter matching module name ...");
View Full Code Here

            Map<String, ServletFactoryBean> suffixServletMapping)
            throws Exception {
        Map<String, Servlet> suffixServlets = new HashMap<String, Servlet>();
        Set<String> servletSuffixes = suffixServletMapping.keySet();
        for (String suffix : servletSuffixes) {
            ServletFactoryBean servletFactoryBean = suffixServletMapping.get(suffix);
            suffixServlets.put(suffix, (Servlet) servletFactoryBean.getObject());
        }
        return suffixServlets;
    }
View Full Code Here

        Map<String,ServletFactoryBean> servletsByName = new HashMap<String, ServletFactoryBean>();
       
        Set<String> keySet = servletFactoryBeans.keySet();
        for (String key : keySet) {
            ServletFactoryBean bean = servletFactoryBeans.get(key);
            servletsByName.put(bean.getServletName(), bean);
        }
        return servletsByName;
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.web.spring.integration.ServletFactoryBean

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.