Package org.apache.axis2.description

Examples of org.apache.axis2.description.Flow


     *
     * @param module
     */
    public void disengageModuleFromGlobalChains(AxisModule module) {
        //INFLOW
        Flow flow = module.getInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getInFlowPhases());
            }
        }
        //OUTFLOW
        flow = module.getOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getOutFlowPhases());
            }
        }
        //INFAULTFLOW
        flow = module.getFaultInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getInFaultFlowPhases());
            }
        }
        //OUTFAULTFLOW
        flow = module.getFaultOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getOutFaultFlowPhases());
            }
        }
    }
View Full Code Here


     *
     * @param module
     */
    public void disengageModuleFromOperationChain(AxisModule module, AxisOperation operation) {
        //INFLOW
        Flow flow = module.getInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getRemainingPhasesInFlow());
            }
        }
        //OUTFLOW
        flow = module.getOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getPhasesOutFlow());
            }
        }
        //INFAULTFLOW
        flow = module.getFaultInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getPhasesInFaultFlow());
            }
        }
        //OUTFAULTFLOW
        flow = module.getFaultOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getPhasesOutFaultFlow());
            }
        }
    }
View Full Code Here

        moduleHandler.init(handler1);
        PhaseRule rule1 = new PhaseRule();
        rule1.setPhaseName(phaseName);
        handler1.setRules(rule1);
        handler1.setHandler(moduleHandler);
        Flow flow = new Flow();
        flow.addHandler(handler1);
        return flow;
    }
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

            currentDeploymentFile.setClassLoader(false, config.getModuleClassLoader(), null);
            axismodule.setModuleClassLoader(currentDeploymentFile.getClassLoader());
            archiveReader.readModuleArchive(currentDeploymentFile, axismodule,
                                            false, config);
            ClassLoader moduleClassLoader = axismodule.getModuleClassLoader();
            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);
            }
        } catch (AxisFault axisFault) {
View Full Code Here

            Class.forName("org.apache.axis2.Echo2", true, cl);
            assertNotNull(service.getName());
            //no style for the service
            //   assertEquals(service.getStyle(),"rpc");

            Flow flow = service.getFaultInFlow();
            assertTrue(flow.getHandlerCount() > 0);
            flow = service.getInFlow();
            assertTrue(flow.getHandlerCount() > 0);
            flow = service.getOutFlow();
            assertTrue(flow.getHandlerCount() > 0);
            assertNotNull(service.getParameter("para2"));

            AxisOperation op = service.getOperation(new QName("opname"));
            assertNotNull(op);
        } catch (Exception e) {
View Full Code Here

     *
     * @param axisService
     * @throws org.apache.axis2.AxisFault
     */
    public static void loadServiceProperties(AxisService axisService) throws AxisFault {
        Flow inflow = axisService.getInFlow();
        ClassLoader cls = axisService.getClassLoader();
        if (inflow != null) {
            addFlowHandlers(inflow, cls);
        }

        Flow outFlow = axisService.getOutFlow();
        if (outFlow != null) {
            addFlowHandlers(outFlow, cls);
        }

        Flow faultInFlow = axisService.getFaultInFlow();
        if (faultInFlow != null) {
            addFlowHandlers(faultInFlow, cls);
        }

        Flow faultOutFlow = axisService.getFaultOutFlow();
        if (faultOutFlow != null) {
            addFlowHandlers(faultOutFlow, cls);
        }
        // axisService.setClassLoader(currentArchiveFile.getClassLoader());
    }
View Full Code Here

     * @return
     * @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(HANDERST));
        while (handlers.hasNext()) {
            OMElement  handlerElement =  (OMElement)handlers.next();
            flow.addHandler(processHandler(handlerElement,parent));
        }
        return flow;
    }
View Full Code Here

        this.axisConfig = axisconfig;
    }

    public void engageModuleToOperation(AxisOperation axisOperation, AxisModule 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.getGlobalInFlow().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 : {
                    ArrayList phases = new ArrayList();
                    Iterator itr_ops = axisOperation.getPhasesOutFaultFlow().iterator();
                    while (itr_ops.hasNext()) {
                        Object o = itr_ops.next();

                        phases.add(o);
                    }
                    if (axisConfig != null) {
                        Iterator itr_axis_config = axisConfig.getOutFaultFlow().iterator();
                        while (itr_axis_config.hasNext()) {
                            Object o = itr_axis_config.next();
                            phases.add(o);
                        }
                    }
                    phaseHolder = new PhaseHolder(phases);
                    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

     *
     * @param module
     */
    public void disengageModuleFromGlobalChains(AxisModule module) {
        //INFLOW
        Flow flow = module.getInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getGlobalInFlow());
            }
        }
        //OUTFLOW
        flow = module.getOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getGlobalOutPhases());
            }
        }
        //INFAULTFLOW
        flow = module.getFaultInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getInFaultFlow());
            }
        }
        //OUTFAULTFLOW
        flow = module.getFaultOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, axisConfig.getOutFaultFlow());
            }
        }
    }
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.