Package org.apache.axis2.description

Examples of org.apache.axis2.description.Flow


     * @return Returns Flow.
     * @throws DeploymentException <code>DeploymentException</code>
     */
    protected Flow processFlow(OMElement flowelement, ParameterInclude parent)
            throws DeploymentException {
        Flow flow = new Flow();

        if (flowelement == null) {
            return flow;
        }

        Iterator handlers = flowelement.getChildrenWithName(new QName(TAG_HANDLER));

        while (handlers.hasNext()) {
            OMElement handlerElement = (OMElement) handlers.next();

            flow.addHandler(processHandler(handlerElement, parent));
        }

        return flow;
    }
View Full Code Here


    public PhaseResolver(AxisConfiguration engineConfig) {
        this.axisConfig = engineConfig;
    }

    private void buildINTransportChains(TransportInDescription transport) throws PhaseException {
        Flow flow = null;
        Phase phase = null;

        for (int type = IN_FLOW; type < OUT_FAULT_FLOW; type++) {
            switch (type) {
                case PhaseMetadata.IN_FLOW : {
                    flow = transport.getInFlow();
                    phase = transport.getInPhase();

                    break;
                }

                case PhaseMetadata.FAULT_IN_FLOW : {
                    flow = transport.getFaultFlow();
                    phase = transport.getFaultPhase();

                    break;
                }
            }

            if (flow != null) {
                ArrayList handlers = new ArrayList();

                for (int j = 0; j < flow.getHandlerCount(); j++) {
                    HandlerDescription metadata = flow.getHandler(j);

                    metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
                    handlers.add(metadata);
                }
View Full Code Here

     *
     * @param transport
     * @throws PhaseException
     */
    private void buildOutTransportChains(TransportOutDescription transport) throws PhaseException {
        Flow flow = null;
        Phase phase = null;

        for (int type = IN_FLOW; type < OUT_FAULT_FLOW; type++) {
            switch (type) {
                case PhaseMetadata.OUT_FLOW : {
                    flow = transport.getOutFlow();
                    phase = transport.getOutPhase();

                    break;
                }

                case PhaseMetadata.FAULT_OUT_FLOW : {
                    flow = transport.getFaultFlow();
                    phase = transport.getFaultPhase();

                    break;
                }
            }

            if (flow != null) {
                ArrayList handlers = new ArrayList();

                for (int j = 0; j < flow.getHandlerCount(); j++) {
                    HandlerDescription metadata = flow.getHandler(j);

                    metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
                    handlers.add(metadata);
                }

View Full Code Here

        }
    }

    public void engageModuleToOperation(AxisOperation axisOperation, ModuleDescription module)
            throws PhaseException {
        Flow flow = null;

        for (int type = IN_FLOW; type < OUT_FAULT_FLOW; type++) {
            switch (type) {
                case PhaseMetadata.IN_FLOW : {
                    ArrayList phases = new ArrayList();

                    if (axisConfig != null) {
                        Iterator itr_axis_config =
                                axisConfig.getInPhasesUptoAndIncludingPostDispatch().iterator();

                        while (itr_axis_config.hasNext()) {
                            Object o = itr_axis_config.next();

                            phases.add(o);
                        }
                    }

                    Iterator itr_ops = axisOperation.getRemainingPhasesInFlow().iterator();

                    while (itr_ops.hasNext()) {
                        Object o = itr_ops.next();

                        phases.add(o);
                    }

                    phaseHolder = new PhaseHolder(phases);

                    break;
                }

                case PhaseMetadata.OUT_FLOW : {
                    ArrayList phases = new ArrayList();
                    Iterator itr_ops = axisOperation.getPhasesOutFlow().iterator();

                    while (itr_ops.hasNext()) {
                        Object o = itr_ops.next();

                        phases.add(o);
                    }

                    if (axisConfig != null) {
                        Iterator itr_axis_config = axisConfig.getGlobalOutPhases().iterator();

                        while (itr_axis_config.hasNext()) {
                            Object o = itr_axis_config.next();

                            phases.add(o);
                        }
                    }

                    phaseHolder = new PhaseHolder(phases);

                    break;
                }

                case PhaseMetadata.FAULT_IN_FLOW : {
                    ArrayList phases = new ArrayList();

                    if (axisConfig != null) {
                        Iterator itr_axis_config = axisConfig.getInFaultFlow().iterator();

                        while (itr_axis_config.hasNext()) {
                            Object o = itr_axis_config.next();

                            phases.add(o);
                        }
                    }

                    Iterator itr_ops = axisOperation.getPhasesInFaultFlow().iterator();

                    while (itr_ops.hasNext()) {
                        Object o = itr_ops.next();

                        phases.add(o);
                    }

                    phaseHolder = new PhaseHolder(phases);

                    break;
                }

                case PhaseMetadata.FAULT_OUT_FLOW : {
                    phaseHolder = new PhaseHolder(axisOperation.getPhasesOutFaultFlow());

                    break;
                }
            }

            switch (type) {
                case PhaseMetadata.IN_FLOW : {
                    flow = module.getInFlow();

                    break;
                }

                case PhaseMetadata.OUT_FLOW : {
                    flow = module.getOutFlow();

                    break;
                }

                case PhaseMetadata.FAULT_IN_FLOW : {
                    flow = module.getFaultInFlow();

                    break;
                }

                case PhaseMetadata.FAULT_OUT_FLOW : {
                    flow = module.getFaultOutFlow();

                    break;
                }
            }

            if (flow != null) {
                for (int j = 0; j < flow.getHandlerCount(); j++) {
                    HandlerDescription metadata = flow.getHandler(j);

                    phaseHolder.addHandler(metadata);
                }
            }
        }
View Full Code Here

     * @return Returns Flow.
     * @throws DeploymentException <code>DeploymentException</code>
     */
    protected Flow processFlow(OMElement flowelement, ParameterInclude parent)
            throws DeploymentException {
        Flow flow = new FlowImpl();

        if (flowelement == null) {
            return flow;
        }

        Iterator handlers = flowelement.getChildrenWithName(new QName(TAG_HANDLER));

        while (handlers.hasNext()) {
            OMElement handlerElement = (OMElement) handlers.next();

            flow.addHandler(processHandler(handlerElement, parent));
        }

        return flow;
    }
View Full Code Here

        modulelist.add(moduleName);
    }

    private void addNewModule(ModuleDescription modulemetadata) throws AxisFault {

        Flow inflow = modulemetadata.getInFlow();
        ClassLoader moduleClassLoader = modulemetadata.getModuleClassLoader();

        if (inflow != null) {
            Utils.addFlowHandlers(inflow, moduleClassLoader);
        }

        Flow outFlow = modulemetadata.getOutFlow();

        if (outFlow != null) {
            Utils.addFlowHandlers(outFlow, moduleClassLoader);
        }

        Flow faultInFlow = modulemetadata.getFaultInFlow();

        if (faultInFlow != null) {
            Utils.addFlowHandlers(faultInFlow, moduleClassLoader);
        }

        Flow faultOutFlow = modulemetadata.getFaultOutFlow();

        if (faultOutFlow != null) {
            Utils.addFlowHandlers(faultOutFlow, moduleClassLoader);
        }
View Full Code Here

            currentArchiveFile.setClassLoader(false, moduleClassLoader);
            archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(), this, axismodule,
                    false, axisConfig);

            Flow inflow = axismodule.getInFlow();

            if (inflow != null) {
                Utils.addFlowHandlers(inflow, moduleClassLoader);
            }

            Flow outFlow = axismodule.getOutFlow();

            if (outFlow != null) {
                Utils.addFlowHandlers(outFlow, moduleClassLoader);
            }

            Flow faultInFlow = axismodule.getFaultInFlow();

            if (faultInFlow != null) {
                Utils.addFlowHandlers(faultInFlow, moduleClassLoader);
            }

            Flow faultOutFlow = axismodule.getFaultOutFlow();

            if (faultOutFlow != null) {
                Utils.addFlowHandlers(faultOutFlow, moduleClassLoader);
            }
View Full Code Here

     * @return Returns Flow.
     * @throws DeploymentException <code>DeploymentException</code>
     */
    protected Flow processFlow(OMElement flowelement, ParameterInclude parent)
            throws DeploymentException {
        Flow flow = new Flow();

        if (flowelement == null) {
            return flow;
        }

        Iterator handlers = flowelement.getChildrenWithName(new QName(
                TAG_HANDLER));

        while (handlers.hasNext()) {
            OMElement handlerElement = (OMElement) handlers.next();

            flow.addHandler(processHandler(handlerElement, parent));
        }

        return flow;
    }
View Full Code Here

    //This method calls the init method of the handlers that we want to initialize.
    //Currently only the handlers in the OutFlow and FaultOutFlow are initialized
    //by this code. If handlers in other flows need to be initialized then code will
    //need to be added to do so.
    private void initHandlers(AxisModule axisModule) {
        Flow flow = axisModule.getOutFlow();
        if (log.isTraceEnabled()) {
            log.trace("initHandlers: Initializing handlers in out flow.");
        }
        for (int i = 0, size = flow.getHandlerCount(); i < size; i++) {
            HandlerDescription description = flow.getHandler(i);
            Handler handler = description.getHandler();
            handler.init(description);
        }

        flow = axisModule.getFaultOutFlow();
        if (log.isTraceEnabled()) {
            log.trace("initHandlers: Initializing handlers in fault out flow.");
        }
        for (int i = 0, size = flow.getHandlerCount(); i < size; i++) {
            HandlerDescription description = flow.getHandler(i);
            Handler handler = description.getHandler();
            handler.init(description);
        }
    }
View Full Code Here

    }

    public static void addNewModule(AxisModule modulemetadata,
                                    AxisConfiguration axisConfiguration) throws AxisFault {

        Flow inflow = modulemetadata.getInFlow();
        ClassLoader moduleClassLoader = modulemetadata.getModuleClassLoader();

        if (inflow != null) {
            Utils.addFlowHandlers(inflow, moduleClassLoader);
        }

        Flow outFlow = modulemetadata.getOutFlow();

        if (outFlow != null) {
            Utils.addFlowHandlers(outFlow, moduleClassLoader);
        }

        Flow faultInFlow = modulemetadata.getFaultInFlow();

        if (faultInFlow != null) {
            Utils.addFlowHandlers(faultInFlow, moduleClassLoader);
        }

        Flow faultOutFlow = modulemetadata.getFaultOutFlow();

        if (faultOutFlow != null) {
            Utils.addFlowHandlers(faultOutFlow, moduleClassLoader);
        }
View Full Code Here

TOP

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

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.