Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.Phase.addHandler()


        PhaseRuleHandler h2 = new PhaseRuleHandler("b");
        h2.init(hd2);

        hd2.setHandler(h2);
        hd2.setRules(rule2);
        phase.addHandler(hd2);
        //////////////////////////////////////////////////////

        //////////////// handler 3 //////////////////////////
        PhaseRule rule3 = new PhaseRule();
        rule3.setAfter("b");
View Full Code Here


        h3.init(hd3);

        hd3.setHandler(h3);
        hd3.setRules(rule3);
        try {
            phase.addHandler(hd3);
        } catch (Exception e) {
            fail("Adding handlers with after attribute to the phase behaviour failed");
        }
        //////////////////////////////////////////////////////
    }
View Full Code Here

        PhaseRuleHandler h2 = new PhaseRuleHandler("c");
        hd = new HandlerDescription("c");
        h2.init(hd);

        Phase phase = new Phase();
        phase.addHandler(h1);
        phase.addHandler(h2);

        PhaseRule badRule = new PhaseRule();
        badRule.setBefore("a");
        badRule.setAfter("c");
View Full Code Here

        hd = new HandlerDescription("c");
        h2.init(hd);

        Phase phase = new Phase();
        phase.addHandler(h1);
        phase.addHandler(h2);

        PhaseRule badRule = new PhaseRule();
        badRule.setBefore("a");
        badRule.setAfter("c");
View Full Code Here

        h3.init(hd);

        hd.setHandler(h3);
        hd.setRules(badRule);
        try {
            phase.addHandler(hd);
            fail("Bad PhaseRule was accepted!");
        } catch (PhaseException e) {
            // Correct - exception caught
        }
    }
View Full Code Here

                OMElement omElement = (OMElement) handlers.next();
                HandlerDescription handler = processHandler(omElement, axisConfiguration);
                handler.getRules().setPhaseName(phaseName);
                Utils.loadHandler(axisConfiguration.getSystemClassLoader(), handler);
                try {
                    phase.addHandler(handler);
                } catch (PhaseException e) {
                    throw new DeploymentException(e);
                }
            }
            phaselist.add(phase);
View Full Code Here

        Phase phase = new Phase(phaseName);
        Iterator children = phaseElement.getChildElements();
        while (children.hasNext()) {
            OMElement handlerElement = (OMElement) children.next();
            HandlerDescription handlerDesc = makeHandler(handlerElement);
            phase.addHandler(handlerDesc);
        }
        return phase;
    }

    HandlerDescription makeHandler(OMElement handlerElement) {
View Full Code Here

        Phase newPhase = new Phase(phase.getPhaseName());
        Iterator handlers = phase.getHandlers().iterator();
        while (handlers.hasNext()) {
            try {
                Handler handlerDescription = (Handler) handlers.next();
                newPhase.addHandler(handlerDescription.getHandlerDesc());
            } catch (PhaseException e) {
                throw new DeploymentException(e);
            }
        }
        return newPhase;
View Full Code Here

        if (Phase.ALL_PHASES.equals(phaseName)) {
            handlerDesc.getRules().setBefore("");
            handlerDesc.getRules().setAfter("");
            for (int i = 0; i < phaseList.size(); i++) {
                Phase phase = (Phase) phaseList.get(i);
                phase.addHandler(handlerDesc);
            }
        } else {
            if (isPhaseExist(phaseName)) {
                getPhase(phaseName).addHandler(handlerDesc);
            } else {
View Full Code Here

        while (handlers.hasNext()) {
            try {
                Handler handlerDescription = (Handler) handlers.next();

                newPhase.addHandler(handlerDescription.getHandlerDesc());
            } catch (PhaseException e) {
                throw new DeploymentException(e);
            }
        }
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.