Package com.alibaba.citrus.service.pipeline.impl

Examples of com.alibaba.citrus.service.pipeline.impl.PipelineImpl.newInvocation()


        });

        pipeline = createPipeline(new Valve() {
            public void invoke(PipelineContext pipelineContext) throws Exception {
                contexts[0] = pipelineContext;
                p2.newInvocation(pipelineContext).invoke();
                pipelineContext.invokeNext();
            }
        });

        assertInvoke(pipeline, false);
View Full Code Here


        // set maxLoopCount = 1
        valve.setMaxLoopCount(1);

        try {
            pipeline.newInvocation().invoke();
            fail();
        } catch (TooManyLoopsException e) {
            assertThat(e, exception("Too many loops: exceeds the maximum count: 1"));
        }
View Full Code Here

    @Test
    public void loop_notInited() throws Exception {
        PipelineImpl pipeline = createPipeline(new LogValve(), valve, new LogValve());

        try {
            pipeline.newInvocation().invoke();
            fail();
        } catch (PipelineException e) {
            assertThat(e, exception(IllegalStateException.class, "not been initialized yet"));
        }
    }
View Full Code Here

        // default maxLoopCount = 10
        valve.setLoopBody(createPipeline(new LogValve(), new LogValve(), new LogValve()));
        valve.afterPropertiesSet();

        try {
            pipeline.newInvocation().invoke();
            fail();
        } catch (TooManyLoopsException e) {
            assertThat(e, exception("Too many loops: exceeds the maximum count: 10"));
        }
View Full Code Here

        // set maxLoopCount = 1
        valve.setLoopBody(createPipeline(new LogValve(), new LogValve(), new LogValve()));
        valve.setMaxLoopCount(1);

        try {
            pipeline.newInvocation().invoke();
            fail();
        } catch (TooManyLoopsException e) {
            assertThat(e, exception("Too many loops: exceeds the maximum count: 1"));
        }
View Full Code Here

    @Test
    public void notInPerformRunnableAsync() {
        PipelineImpl pipeline = getPipeline("pipeline1");

        try {
            pipeline.newInvocation().invoke();
            fail();
        } catch (PipelineException e) {
            assertThat(e, exception(IllegalStateException.class, "<doPerformRunnable> valve should be inside <performRunnableAsync>"));
        }
    }
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.