Package org.apache.camel.model

Examples of org.apache.camel.model.MulticastDefinition


        template.sendBody("direct:start", "Hello World");

        assertMockEndpointsSatisfied();

        // now check the route
        MulticastDefinition mc = assertIsInstanceOf(MulticastDefinition.class, context.getRouteDefinitions().get(0).getOutputs().get(0));
        PipelineDefinition pd1 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(0));
        PipelineDefinition pd2 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(1));

        assertEquals(3, pd1.getOutputs().size());
        assertEquals(4, pd2.getOutputs().size());

        SendDefinition send1 = assertIsInstanceOf(SendDefinition.class, pd1.getOutputs().get(2));
View Full Code Here


        template.sendBody("direct:start", "Hello World");

        assertMockEndpointsSatisfied();

        // now check the route
        MulticastDefinition mc = assertIsInstanceOf(MulticastDefinition.class, context.getRouteDefinitions().get(0).getOutputs().get(0));
        PipelineDefinition pd1 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(0));
        PipelineDefinition pd2 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(1));

        assertEquals(3, pd1.getOutputs().size());
        assertEquals(4, pd2.getOutputs().size());

        SendDefinition<?> send1 = assertIsInstanceOf(SendDefinition.class, pd1.getOutputs().get(2));
View Full Code Here

        template.sendBody("direct:start", "Hello World");

        assertMockEndpointsSatisfied();

        // now check the route
        MulticastDefinition mc = assertIsInstanceOf(MulticastDefinition.class, context.getRouteDefinitions().get(0).getOutputs().get(0));
        PipelineDefinition pd1 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(0));
        PipelineDefinition pd2 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(1));

        assertEquals(3, pd1.getOutputs().size());
        assertEquals(4, pd2.getOutputs().size());

        SendDefinition send1 = assertIsInstanceOf(SendDefinition.class, pd1.getOutputs().get(2));
View Full Code Here

        template.sendBody("direct:start", "Hello World");

        assertMockEndpointsSatisfied();

        // now check the route
        MulticastDefinition mc = assertIsInstanceOf(MulticastDefinition.class, context.getRouteDefinitions().get(0).getOutputs().get(0));
        PipelineDefinition pd1 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(0));
        PipelineDefinition pd2 = assertIsInstanceOf(PipelineDefinition.class, mc.getOutputs().get(1));

        assertEquals(3, pd1.getOutputs().size());
        assertEquals(4, pd2.getOutputs().size());

        SendDefinition send1 = assertIsInstanceOf(SendDefinition.class, pd1.getOutputs().get(2));
View Full Code Here

    }

    @SuppressWarnings("rawtypes")
    @Override
    public ProcessorDefinition createCamelDefinition() {
        MulticastDefinition answer = new MulticastDefinition();

        answer.setInheritErrorHandler(toXmlPropertyValue(PROPERTY_INHERITERRORHANDLER, Objects.<Boolean>getField(this, "inheritErrorHandler")));
        answer.setParallelProcessing(toXmlPropertyValue(PROPERTY_PARALLELPROCESSING, this.getParallelProcessing()));
        answer.setStrategyRef(toXmlPropertyValue(PROPERTY_STRATEGYREF, this.getStrategyRef()));
        answer.setStrategyMethodName(toXmlPropertyValue(PROPERTY_STRATEGYMETHODNAME, this.getStrategyMethodName()));
        answer.setStrategyMethodAllowNull(toXmlPropertyValue(PROPERTY_STRATEGYMETHODALLOWNULL, this.getStrategyMethodAllowNull()));
        answer.setExecutorServiceRef(toXmlPropertyValue(PROPERTY_EXECUTORSERVICEREF, this.getExecutorServiceRef()));
        answer.setStreaming(toXmlPropertyValue(PROPERTY_STREAMING, this.getStreaming()));
        answer.setStopOnException(toXmlPropertyValue(PROPERTY_STOPONEXCEPTION, this.getStopOnException()));
        answer.setTimeout(toXmlPropertyValue(PROPERTY_TIMEOUT, this.getTimeout()));
        answer.setOnPrepareRef(toXmlPropertyValue(PROPERTY_ONPREPAREREF, this.getOnPrepareRef()));
        answer.setShareUnitOfWork(toXmlPropertyValue(PROPERTY_SHAREUNITOFWORK, this.getShareUnitOfWork()));

        super.savePropertiesToCamelDefinition(answer);
        return answer;
    }
View Full Code Here

    @Override
    protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
        super.loadPropertiesFromCamelDefinition(processor);

        if (processor instanceof MulticastDefinition) {
            MulticastDefinition node = (MulticastDefinition) processor;

            this.setInheritErrorHandler(Objects.<Boolean>getField(node, "inheritErrorHandler"));
            this.setParallelProcessing(node.getParallelProcessing());
            this.setStrategyRef(node.getStrategyRef());
            this.setStrategyMethodName(node.getStrategyMethodName());
            this.setStrategyMethodAllowNull(node.getStrategyMethodAllowNull());
            this.setExecutorServiceRef(node.getExecutorServiceRef());
            this.setStreaming(node.getStreaming());
            this.setStopOnException(node.getStopOnException());
            this.setTimeout(node.getTimeout());
            this.setOnPrepareRef(node.getOnPrepareRef());
            this.setShareUnitOfWork(node.getShareUnitOfWork());
        } else {
            throw new IllegalArgumentException("ProcessorDefinition not an instanceof MulticastDefinition. Was " + processor.getClass().getName());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.MulticastDefinition

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.