Examples of XMLPipelineProcessImpl


Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

        return simpleXMLPipelineConfiguration;
    }

    // javadoc inherited
    public XMLPipeline createPipeline(XMLPipelineContext context) {
        return new XMLPipelineProcessImpl(context);
    }
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

        passThroughControllers[2] = expressionProcess;

        // create a pipeline process that will contain the individual
        // process that together provide the functionality of this dynamic
        // process
        XMLPipelineProcess preprocessor = new XMLPipelineProcessImpl();

        // Add the processes. In the following order, from first to last.
        // - Flow control Process - comes first as it controls what events the
        //   rest see.
        // - DISelect Process - comes next as it can filter out elements and
        //   doing that first can save work, improving performance.
        // - Expression Process - comes next as it must evaluate expressions
        //   before they are seen by the Dynamic Element Rules.
        // - Dynamic Rule Process
        preprocessor.addHeadProcess(dynamicRuleProcess);
        preprocessor.addHeadProcess(expressionProcess);
        preprocessor.addHeadProcess(diSelectProcess);
        preprocessor.addHeadProcess(new FlowControlProcess());

        // set the pipeline as the preprocessor
        this.initialisePreprocessor(preprocessor);
    }
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

        final DependencyContextMock dependencyContextMock =
            new DependencyContextMock("dependencyContextMock", expectations);
        pipelineContextMock =
            new XMLPipelineContextMock("pipelineContextMock", expectations);
        final XMLPipeline pipeline =
            new XMLPipelineProcessImpl(pipelineContextMock);

        final CacheProcessConfiguration cacheProcessConfig =
            new CacheProcessConfiguration();
        cacheProcessConfig.createCache("cacheName", "100", "50");
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

        extends XMLWrappingProcessTestAbstract {

    protected XMLProcess createTestableProcess() {
        WSDLOperationAdapterProcess process = new WSDLOperationAdapterProcess()
        XMLPipelineProcess pipeline =
                new XMLPipelineProcessImpl(createPipelineContext());
        process.setPipeline(pipeline);
        return process;
    }
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

     * the stack, but cache with those attributes does not exist.
     */
    public void testAttributesOK() throws Exception {

        DynamicElementRule rule = new CacheBodyRule();
        XMLPipeline pipeline = new XMLPipelineProcessImpl(contextMock);

        final String cacheName = "cache406";
        final String cacheKeyValue = "cacheKey406";

        //Create and set attributes for CacheProperties instance
        CacheKey cacheKey = new CacheKey();
        cacheKey.addKey(cacheKeyValue);
        CacheControl cacheControl = new CacheControl();
        cacheControl.setTimeToLive(CacheControlRule.calculateTimeToLive("997"));
        CacheProperties properties = new CacheProperties();
        properties.setCacheControl(cacheControl);
        properties.setCacheKey(cacheKey);
        properties.setCacheName(cacheName);

        // Prepare mocks for startElement method
        contextMock.expects.findObject(CacheProperties.class).
                returns(properties).any();

        final DependencyContextMock dependencyContextMock =
            new DependencyContextMock("dependencyContextMock", expectations);
        contextMock.expects.getDependencyContext().returns(
            dependencyContextMock).any();

        // VBM:2006120611 - using Mocks can be fragile. Needed to add new mock
        // and expectation to get this test to pass again.
        final XMLPipelineConfigurationMock pipelineConfigurationMock =
            new XMLPipelineConfigurationMock("pipelineConfigurationMock",
                expectations);
        pipelineConfigurationMock.expects.retrieveConfiguration(
                CacheProcessConfiguration.class).returns(
                new CacheProcessConfiguration() {
                    {
                        createCache(cacheName, "100", "0");
                    }
                });

        contextMock.expects.getPipelineConfiguration()
                .returns(pipelineConfigurationMock);

        dynamicProcessMock.expects.getPipeline().returns(pipeline);
        dynamicProcessMock.fuzzy.addProcess(mockFactory.
                expectsInstanceOf(CacheBodyOperationProcess.class));

        //startElement
        EndElementAction action = (EndElementAction) rule.
                startElement(dynamicProcessMock, elementName, attributes);
        assertNotNull(action);
        assertNotEquals(action, EndElementAction.DO_NOTHING);

        //Prepare mocks for endElement method
        dynamicProcessMock.expects.removeProcess().
                returns(new XMLPipelineProcessImpl(contextMock));

        //endElement
        rule.endElement(dynamicProcessMock, elementName, action);
    }
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

        extends XMLWrappingProcessTestAbstract {

    protected XMLProcess createTestableProcess() {
        MessageAdapterProcess process = new MessageAdapterProcess();
        XMLPipelineContext context = createPipelineContext();
        XMLPipelineProcess pipeline = new XMLPipelineProcessImpl(context);
        process.setElementDetails("namespace", "message", "wsd");

        process.setPipeline(pipeline);

        return process;
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

     * Test: cache element with both name and cacheKey attributes set.
     * CacheEntry for those attributes does not exist in the cache.
     */
    public void testAttributes() throws Exception {

        XMLPipeline pipeline = new XMLPipelineProcessImpl(contextMock);

        final String cacheName = "cache107";
        final String cacheKeyValue = "key107";

        CacheKey cacheKey = new CacheKey();
        cacheKey.addKey(cacheKeyValue);

        cacheProcessConfig.createCache(cacheName, "4", "0");

        // @todo peterca
        //cache.put(cacheKey, new CacheEntry(null, false));

        addAttribute("name", cacheName);
        addAttribute("key", cacheKeyValue);

        dynamicProcessMock.expects.getPipeline().returns(pipeline);
        dynamicProcessMock.fuzzy.addProcess(mockFactory.
                expectsInstanceOf(CacheBodyOperationProcess.class));

        EndElementAction action = (EndElementAction) cacheRule.
                startElement(dynamicProcessMock, elementName, attributes);
        assertNotNull(action);
        assertNotEquals(action, EndElementAction.DO_NOTHING);

        // Prepare mocks
        dynamicProcessMock.expects.removeProcess().
                returns(new XMLPipelineProcessImpl(contextMock));
        cacheRule.endElement(dynamicProcessMock, elementName, action);
    }
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.XMLPipelineProcessImpl

     * Tests if CacheRule correctly delegates the time to live and expire mode
     * values to the CacheBodyOperationProcess.
     */
    public void testTimeToLiveWithKeyAttr() throws Exception {

        final XMLPipeline pipeline = new XMLPipelineProcessImpl(contextMock);
        dynamicProcessMock.expects.getPipeline().returns(pipeline);

        final CacheBodyOperationProcess[] cacheBodyOperationProcess =
            new CacheBodyOperationProcess[1];

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.