Package com.volantis.mcs.runtime.configuration

Examples of com.volantis.mcs.runtime.configuration.ServletFilterConfiguration


        Volantis volantis = ApplicationInternals.getVolantisBean(application);

        // Get the servlet configuration from the mcs-config.xml file. This
        // is an optional configuration. If not present, the servlet filter
        // operates in "pass-through" mode.
        ServletFilterConfiguration config =
                volantis.getServletFilterConfiguration();

        if (config != null) {
            passThroughMode = false;
            excludedDevices = config.getExcludedDevices();

            if (logger.isDebugEnabled()) {
                Iterator it = excludedDevices.iterator();
                while (it.hasNext()) {
                    String device = (String) it.next();
                    logger.debug("Read excluded device: " + device);
                }
            }

            List xdimeMimeTypes = config.getMimeTypes();

            if (logger.isDebugEnabled()) {
                Iterator it = xdimeMimeTypes.iterator();
                while (it.hasNext()) {
                    String type = (String) it.next();
                    logger.debug("Read mime type: " + type);
                }
            }           

            try {
                addDescendantDevices();
            } catch (RepositoryException e) {
                logger.error("mcs-filter-child-device-error", e);
                throw new ServletException(
                        exceptionLocalizer.format(
                                "mcs-filter-child-device-error"),
                        e);
            }

            // Get the page cache configuration from the mcs-config.xml file.
            // This is an optional configuration. If not present, the page
            // cache will not be enabled.
            RenderedPageCacheConfiguration cacheConfig =
                    config.getRenderedPageCacheConfig();
            if (cacheConfig != null) {
                // use an XDIMERequestProcess that performs caching
                xdimeRequestProcessor =
                        new CachingXDIMERequestProcessor(
                                               servletContext,
                                               xdimeMimeTypes,
                                               cacheConfig,
                                               config.getJsessionIdName());
            } else {
                // not caching so use the simple processor
                xdimeRequestProcessor = new SimpleXDIMERequestProcessor(
                        servletContext, xdimeMimeTypes);
            }
View Full Code Here


        Volantis volantis = ApplicationInternals.getVolantisBean(application);

        // Get the servlet configuration from the mcs-config.xml file. This
        // is an optional configuration. If not present no special handling of
        // XDIME responses can be performed.
        ServletFilterConfiguration config =
                volantis.getServletFilterConfiguration();

        if (config != null) {
            xdimeRequestProcessor = new SimpleXDIMERequestProcessor(
                    servletConfig.getServletContext(), config.getMimeTypes());
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.configuration.ServletFilterConfiguration

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.