当前位置: 首页>>代码示例>>Java>>正文


Java AxisConfiguration.getInFlowPhases方法代码示例

本文整理汇总了Java中org.apache.axis2.engine.AxisConfiguration.getInFlowPhases方法的典型用法代码示例。如果您正苦于以下问题:Java AxisConfiguration.getInFlowPhases方法的具体用法?Java AxisConfiguration.getInFlowPhases怎么用?Java AxisConfiguration.getInFlowPhases使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.engine.AxisConfiguration的用法示例。


在下文中一共展示了AxisConfiguration.getInFlowPhases方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testPhaseRules

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testPhaseRules() throws Exception {
        //TODO fix me
        axisConfig = new AxisConfiguration();
        List inPhase = axisConfig.getInFlowPhases();
        Phase transportIN = new Phase("TransportIn");
        Phase preDispatch = new Phase("PreDispatch");
        DispatchPhase dispatchPhase = new DispatchPhase();
//
        dispatchPhase.setName("Dispatch");
        inPhase.add(transportIN);
        inPhase.add(preDispatch);
        inPhase.add(dispatchPhase);

        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h1 = new PhaseRuleHandler();
        hm.setHandler(h1);
        hm.getRules().setPhaseName("*");

        PhaseHolder ph = new PhaseHolder(inPhase);
        ph.addHandler(hm);
        boolean found;
        for (int i = 0; i < inPhase.size(); i++) {
            found = false;
            Phase phase = (Phase) inPhase.get(i);
            List handlers = phase.getHandlers();
            for (int j = 0; j < handlers.size(); j++) {
                Handler handler = (Handler) handlers.get(j);
                if (h1.equals(handler)) {
                    found = true;
                }
            }
            if (!found) {
                fail("Some thing has gone wrong hnadler does not exit in the phase :"
                        + phase.getPhaseName());
            }
        }
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:39,代码来源:AddingHandlerToEachPhaseTest.java

示例2: testPhaseRulesWithPhaseFirst

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testPhaseRulesWithPhaseFirst() throws Exception {
        super.setUp();
        //TODO fix me
        axisConfig = new AxisConfiguration();
        List inPhase = axisConfig.getInFlowPhases();
        Phase transportIN = new Phase("TransportIn");
        Phase preDispatch = new Phase("PreDispatch");
        DispatchPhase dispatchPhase = new DispatchPhase();
//
        dispatchPhase.setName("Dispatch");
        inPhase.add(transportIN);
        inPhase.add(preDispatch);
        inPhase.add(dispatchPhase);

        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h1 = new PhaseRuleHandler();
        hm.setHandler(h1);
        hm.getRules().setPhaseName("*");
        hm.getRules().setPhaseFirst(true);

        PhaseHolder ph = new PhaseHolder(inPhase);
        ph.addHandler(hm);
        for (int i = 0; i < inPhase.size(); i++) {
            Phase phase = (Phase) inPhase.get(i);
            List handlers = phase.getHandlers();
            Handler handler = (Handler) handlers.get(0);
            if (!h1.equals(handler)) {
                fail("Some thing has gone wrong hnadler does not exit as phase " +
                        "first handler the phase :"
                        + phase.getPhaseName());
            }
        }
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:35,代码来源:AddingHandlerToEachPhaseTest.java

示例3: testPhaseRulesWithAfter

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testPhaseRulesWithAfter() throws Exception {
        //TODO fix me
        axisConfig = new AxisConfiguration();
        List inPhase = axisConfig.getInFlowPhases();
        Phase transportIN = new Phase("TransportIn");
        Phase preDispatch = new Phase("PreDispatch");
        DispatchPhase dispatchPhase = new DispatchPhase();
//
        dispatchPhase.setName("Dispatch");
        inPhase.add(transportIN);
        inPhase.add(preDispatch);
        inPhase.add(dispatchPhase);

        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h1 = new PhaseRuleHandler();
        hm.setHandler(h1);
        hm.getRules().setPhaseName("*");
        hm.getRules().setPhaseFirst(true);

        PhaseHolder ph = new PhaseHolder(inPhase);
        ph.addHandler(hm);
        for (int i = 0; i < inPhase.size(); i++) {
            Phase phase = (Phase) inPhase.get(i);
            List handlers = phase.getHandlers();
            Handler handler = (Handler) handlers.get(0);
            assertNull(handler.getHandlerDesc().getRules().getAfter());
        }
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:30,代码来源:AddingHandlerToEachPhaseTest.java


注:本文中的org.apache.axis2.engine.AxisConfiguration.getInFlowPhases方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。