Package org.apache.axis2.description

Examples of org.apache.axis2.description.HandlerDescription


                RequestBlockingHandler requestBlockingHandler = new RequestBlockingHandler();
                if (!phase.getHandlers().contains(requestBlockingHandler)) {
                    PhaseRule rule = new PhaseRule("Dispatch");
                    rule.setAfter("SOAPMessageBodyBasedDispatcher");
                    rule.setBefore("InstanceDispatcher");
                    HandlerDescription handlerDesc = requestBlockingHandler.getHandlerDesc();
                    handlerDesc.setHandler(requestBlockingHandler);
                    handlerDesc.setName(ClusteringConstants.REQUEST_BLOCKING_HANDLER);
                    handlerDesc.setRules(rule);
                    phase.addHandler(requestBlockingHandler);

                    log.debug("Added " + ClusteringConstants.REQUEST_BLOCKING_HANDLER +
                              " between SOAPMessageBodyBasedDispatcher & InstanceDispatcher to InFlow");
                    break;
                }
            }
        }
        for (Object o : axisConfig.getInFaultFlowPhases()) {
            Phase phase = (Phase) o;
            if (phase instanceof DispatchPhase) {
                RequestBlockingHandler requestBlockingHandler = new RequestBlockingHandler();
                if (!phase.getHandlers().contains(requestBlockingHandler)) {
                    PhaseRule rule = new PhaseRule("Dispatch");
                    rule.setAfter("SOAPMessageBodyBasedDispatcher");
                    rule.setBefore("InstanceDispatcher");
                    HandlerDescription handlerDesc = requestBlockingHandler.getHandlerDesc();
                    handlerDesc.setHandler(requestBlockingHandler);
                    handlerDesc.setName(ClusteringConstants.REQUEST_BLOCKING_HANDLER);
                    handlerDesc.setRules(rule);
                    phase.addHandler(requestBlockingHandler);

                    log.debug("Added " + ClusteringConstants.REQUEST_BLOCKING_HANDLER +
                              " between SOAPMessageBodyBasedDispatcher & InstanceDispatcher to InFaultFlow");
                    break;
View Full Code Here


            return null;
        }
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

public class Utils {
    private static final Log log = LogFactory.getLog(Utils.class);

    public static void addHandler(Flow flow, Handler handler, String phaseName) {
        HandlerDescription handlerDesc = new HandlerDescription(handler.getName());
        PhaseRule rule = new PhaseRule(phaseName);

        handlerDesc.setRules(rule);
        handler.init(handlerDesc);
        handlerDesc.setHandler(handler);
        flow.addHandler(handlerDesc);
    }
View Full Code Here

            return null;
        }
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

        }
    }

    @Override
    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

  public AxisOperation findOperation(AxisService service, MessageContext messageContext) {
    return null;
  }

  public void initDispatcher() {
      init(new HandlerDescription(NAME));
  }
View Full Code Here

        // #ODEAxisServiceDispatcher will do that
        return null;
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

        if (log.isWarnEnabled()) log.warn("No service has been found!");
        return null;
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

    private static final QName MEDIATE_OPERATION_NAME = new QName("mediate");

    public void initDispatcher() {
        QName qn = new QName("http://synapse.apache.org", "SynapseDispatcher");
        HandlerDescription hd = new HandlerDescription(qn.getLocalPart());
        super.init(hd);
    }
View Full Code Here

        phases.add(p1);
        Phase p2 = new Phase("PhaseB");
        phases.add(p2);

        PhaseHolder ph = new PhaseHolder(phases);
        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h1 = new PhaseRuleHandlers();
        h1.init(hm);
        ((PhaseRuleHandlers) h1).setName(new QName("First"));
        hm.setHandler(h1);
        hm.setName(new QName("H1"));
        PhaseRule rule = new PhaseRule();
        rule.setPhaseName("PhaseA");
        hm.setRules(rule);
        ph.addHandler(hm);

        HandlerDescription hm1 = new HandlerDescription();
        hm1.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h2 = new PhaseRuleHandlers();
        ((PhaseRuleHandlers) h2).setName(new QName("Forth"));
        h2.init(hm1);
        hm1.setHandler(h2);
        hm1.setName(new QName("H2"));
        PhaseRule rule1 = new PhaseRule();
        rule1.setPhaseName("PhaseA");
        hm1.setRules(rule1);
        ph.addHandler(hm1);


        HandlerDescription hm3 = new HandlerDescription();
        hm3.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h3 = new PhaseRuleHandlers();
        ((PhaseRuleHandlers) h3).setName(new QName("Second"));
        h3.init(hm3);
        hm3.setHandler(h3);
        hm3.setName(new QName("H3"));
        PhaseRule rule3 = new PhaseRule();
        rule3.setPhaseName("PhaseA");
        rule3.setAfter("H1");
        hm3.setRules(rule3);
        ph.addHandler(hm3);

        HandlerDescription hm4 = new HandlerDescription();
        hm4.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h4 = new PhaseRuleHandlers();
        ((PhaseRuleHandlers) h4).setName(new QName("Third"));
        h4.init(hm4);
        hm4.setHandler(h4);
        hm4.setName(new QName("H4"));
        PhaseRule rule4 = new PhaseRule();
        rule4.setPhaseName("PhaseA");
        rule4.setAfter("H1");
        rule4.setBefore("H2");
        hm4.setRules(rule4);
        ph.addHandler(hm4);

        ArrayList handlers = p1.getHandlers();
        boolean foundH1 = false;
        boolean foundH4 = false;
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.HandlerDescription

Copyright © 2018 www.massapicom. 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.