Package com.volantis.mcs.runtime.configuration

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


       
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        AgentConfiguration agent = config.getAgent();
        if (value != null) {
            assertNotNull("agentConfiguration", agent);
            // enabled attribute is tested via the EnabledDigester test case
            assertEquals(value.port, agent.getPort());
            assertEquals(value.password, agent.getPassword());
        } else {
            assertNull("agentConfiguration", agent);
        }
    }
View Full Code Here


        // @todo make this part of the internal API and move to MPS
        configBuilder.addApplicationPluginRuleSet(new MpsPluginRuleSet());
        mariner = configBuilder.buildConfiguration();

        // Create references to all the simple sub-objects
        AgentConfiguration agent = mariner.getAgent();
        AppServerConfiguration appServer = mariner.getAppServer();
        DebugConfiguration debug = mariner.getDebug();
        ProtocolsConfiguration protocols = mariner.getProtocols();

        // Build the map of element attribute values just the same as the
        // previous XMLHandler based Config did for backwards compatibility.
        AttributeMap attrs;
        if (mariner != null) {

            attrs = makeAttrs(Volantis.CONFIG_PAGEMESSAGES_ELEMENT);
            attrs.put("heading", mariner.getPageMessageHeading());

            attrs = makeAttrs(Volantis.CONFIG_SCRIPTS_ELEMENT);
            attrs.put("base", mariner.getScriptsBase());

            attrs = makeAttrs(Volantis.CONFIG_MODESETS_ELEMENT);
            attrs.put("base", mariner.getModeSetsBase());

            attrs = makeAttrs(Volantis.CONFIG_CHARTIMAGES_ELEMENT);
            attrs.put("base", mariner.getChartImagesBase());

            attrs = makeAttrs(Volantis.PLUGINS_ELEMENT);
            attrs.put("url-rewriter", mariner.getUrlRewriterPluginClass());
            attrs.put("asset-url-rewriter",
                      mariner.getAssetURLRewriterPluginClass());
            attrs.put("asset-transcoder",
                      mariner.getAssetTranscoderPluginClass());

            attrs = makeAttrs(Volantis.CONFIG_PAGE_PACKAGING_MIME);
            attrs.put("enabled", mariner.getPagePackagingMimeEnabled());

            attrs = makeAttrs(Volantis.CONFIG_MAP_COOKIES_ELEMENT);
            attrs.put("enabled", mariner.getSessionProxyCookieMappingEnabled());

        }

        if (debug != null) {
            attrs = makeAttrs(Volantis.CONFIG_DEBUG_ELEMENT);
            attrs.put("logPageOutput", debug.getLogPageOutput());
            attrs.put("comments", debug.getComments());
        }

        if (protocols != null) {
            attrs = makeAttrs(Volantis.CONFIG_PROTOCOLS_ELEMENT);
            attrs.put("preferred-output-format",
                    protocols.getPreferredOutputFormat());
        }


        if (agent != null) {
            attrs = makeAttrs(Volantis.CONFIG_AGENT_ELEMENT);
            attrs.put("enabled", "true"); // corresponds to Enabled.
            attrs.put("password", agent.getPassword());
            attrs.put("port", agent.getPort());
        }

        if (appServer != null) {
            attrs = makeAttrs(Volantis.CONFIG_WEBAPP_ELEMENT);
            attrs.put("base-url", appServer.getBaseUrl());
View Full Code Here

TOP

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

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.