Package com.alibaba.citrus.service.pipeline

Examples of com.alibaba.citrus.service.pipeline.PipelineInvocationHandle.invoke()


        // pipeline reference
        pipeline = getPipelineImplFromFactory("choose-ref");
        PipelineInvocationHandle handle = pipeline.newInvocation();

        handle.setAttribute("value", 1);
        handle.invoke();
        assertLog("1-1", /* choose *///
                  /* when value==1 */"2-1", //
                  /* when value==2 *///
                  /* otherwise *///
                  "1-3");
View Full Code Here


                  /* when value==2 *///
                  /* otherwise *///
                  "1-3");

        handle.setAttribute("value", 2);
        handle.invoke();
        assertLog("1-1", /* choose *///
                  /* when value==1 *///
                  /* when value==2 */"2-1", "2-2", //
                  /* otherwise *///
                  "1-3");
View Full Code Here

                  /* when value==2 */"2-1", "2-2", //
                  /* otherwise *///
                  "1-3");

        handle.setAttribute("value", 3);
        handle.invoke();
        assertLog("1-1", /* choose *///
                  /* when value==1 *///
                  /* when value==2 *///
                  /* otherwise */"2-1", "2-2", "2-3", //
                  "1-3");
View Full Code Here

        // pipeline reference
        pipeline = getPipelineImplFromFactory("if-ref");
        PipelineInvocationHandle handle = pipeline.newInvocation();
        handle.setAttribute("value", 1);
        handle.invoke();
        assertLog("1-1", //
                  /* if value==1 */"2-1", //
                  "1-3");
    }
}
View Full Code Here

    public void result() throws Exception {
        getInvocationContext("http://localhost/app1/ddd/eee/myEventScreen/returnValue.jsp");
        initRequestContext();

        PipelineInvocationHandle invocation = pipeline.newInvocation();
        invocation.invoke();

        assertEquals("returnValue", rundata.getRequest().getAttribute("module.screen.ddd.eee.MyEventScreen"));
        assertEquals("myresult", invocation.getAttribute("result"));
    }
View Full Code Here

        getInvocationContext("http://localhost/app1/ddd/eee/myEventScreen/returnValue.jsp");
        initRequestContext();

        PipelineInvocationHandle invocation = pipeline.newInvocation();
        invocation.invoke();

        assertEquals("returnValue", rundata.getRequest().getAttribute("module.screen.ddd.eee.MyEventScreen"));
        assertEquals("myresult", invocation.getAttribute("myresult"));
        assertEquals("myresult", rundata.getRequest().getAttribute("screenResult"));
    }
View Full Code Here

    public void result() throws Exception {
        getInvocationContext("http://localhost/app1/ddd/eee/myEventScreen/returnValue.jsp");
        initRequestContext();

        PipelineInvocationHandle invocation = pipeline.newInvocation();
        invocation.invoke();

        assertEquals("returnValue", rundata.getRequest().getAttribute("module.screen.ddd.eee.MyEventScreen"));
        assertEquals("myresult", invocation.getAttribute("screenResult"));
    }
View Full Code Here

        getInvocationContext("http://localhost/app1/ddd/eee/myEventScreen/returnValue.jsp");
        initRequestContext();

        PipelineInvocationHandle invocation = pipeline.newInvocation();
        invocation.invoke();

        assertEquals("returnValue", rundata.getRequest().getAttribute("module.screen.ddd.eee.MyEventScreen"));
        assertEquals("myresult", invocation.getAttribute("myresult"));
        assertEquals("myresult", rundata.getRequest().getAttribute("screenResult"));
    }
View Full Code Here

            }
        } catch (Exception e) {
            if (catchPipeline != null) {
                PipelineInvocationHandle handle = catchPipeline.newInvocation(pipelineContext);
                handle.setAttribute(getExceptionName(), e);
                handle.invoke();
            } else {
                throw e;
            }
        } finally {
            if (finallyPipeline != null) {
View Full Code Here

    }

    public boolean service(RequestContext requestContext) throws Exception {
        PipelineInvocationHandle handle = pipeline.newInvocation();

        handle.invoke();

        // 假如pipeline被中断,则视作请求未被处理。filter将转入chain中继续处理请求。
        return !handle.isBroken();
    }
}
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.