Package org.apache.camel.model

Examples of org.apache.camel.model.SendDefinition


                sb.append(".random()");
            }
        }

        if (defn instanceof SendDefinition) {
            SendDefinition send = (SendDefinition) defn;
            sb.append(".to(\"" + send.getUri() + "\")");
        }

        List<ProcessorDefinition> children = defn.getOutputs();
        if (children == null || children.isEmpty()) {
            return;
View Full Code Here


                sb.append(".random()");
            }
        }

        if (defn instanceof SendDefinition) {
            SendDefinition send = (SendDefinition) defn;
            sb.append(".to(\"" + send.getEndpoint().getEndpointUri() + "\")");
        }

        List<ProcessorDefinition> children = defn.getOutputs();
        if (children == null || children.isEmpty()) {
            return;
View Full Code Here

        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));
        assertEquals("mock:b", send1.getUri());

        SendDefinition send2 = assertIsInstanceOf(SendDefinition.class, pd2.getOutputs().get(3));
        assertEquals("mock:e", send2.getUri());

        SendDefinition send = assertIsInstanceOf(SendDefinition.class, context.getRouteDefinitions().get(0).getOutputs().get(1));
        assertEquals("mock:result", send.getUri());
    }
View Full Code Here

                sb.append(".random()");
            }
        }

        if (def instanceof SendDefinition) {
            SendDefinition send = (SendDefinition) def;
            sb.append(".to(\"" + send.getEndpoint().getEndpointUri() + "\")");
        }

        List<ProcessorDefinition> children = def.getOutputs();
        if (children == null || children.isEmpty()) {
            return;
View Full Code Here

        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));
        assertEquals("mock://b", send1.getEndpoint().getEndpointUri());

        SendDefinition send2 = assertIsInstanceOf(SendDefinition.class, pd2.getOutputs().get(3));
        assertEquals("mock://e", send2.getEndpoint().getEndpointUri());

        SendDefinition send = assertIsInstanceOf(SendDefinition.class, context.getRouteDefinitions().get(0).getOutputs().get(1));
        assertEquals("mock://result", send.getEndpoint().getEndpointUri());
    }
View Full Code Here

        // Utility class, no public or protected default constructor
    }

    public static void render(StringBuilder buffer, ProcessorDefinition processor) {
        buffer.append(".");
        SendDefinition send = (SendDefinition)processor;
        if (send instanceof WireTapDefinition) {
            // for wireTap
            buffer.append(send.getShortName());
            buffer.append("(\"").append(send.getUri());
            WireTapDefinition wireTap = (WireTapDefinition)send;
            if (wireTap.getNewExchangeExpression() != null) {
                String expression = wireTap.getNewExchangeExpression().toString();
                buffer.append("\", ");
                ExpressionRenderer.renderConstant(buffer, expression);
                buffer.append(")");
            } else {
                buffer.append("\")");
            }
        } else if (send.getPattern() == null) {
            // for to
            buffer.append(send.getShortName());
            buffer.append("(\"").append(send.getUri()).append("\")");
        } else {
            // for inOnly and inOut
            if (send.getPattern().name().equals("InOnly")) {
                buffer.append("inOnly");
            } else if (send.getPattern().name().equals("InOut")) {
                buffer.append("inOut");
            }
            buffer.append("(\"").append(send.getUri()).append("\")");
        }
    }
View Full Code Here

                sb.append(".random()");
            }
        }

        if (def instanceof SendDefinition) {
            SendDefinition send = (SendDefinition) def;
            sb.append(".to(\"" + send.getEndpoint().getEndpointUri() + "\")");
        }

        List<ProcessorDefinition> children = def.getOutputs();
        if (children == null || children.isEmpty()) {
            return;
View Full Code Here

                sb.append(".random()");
            }
        }

        if (defn instanceof SendDefinition) {
            SendDefinition send = (SendDefinition) defn;
            sb.append(".to(\"" + send.getUri() + "\")");
        }

        List<ProcessorDefinition> children = defn.getOutputs();
        if (children == null || children.isEmpty()) {
            return;
View Full Code Here

                sb.append(".random()");
            }
        }

        if (defn instanceof SendDefinition) {
            SendDefinition send = (SendDefinition) defn;
            sb.append(".to(\"" + send.getUri() + "\")");
        }

        List<ProcessorDefinition> children = defn.getOutputs();
        if (children == null || children.isEmpty()) {
            return;
View Full Code Here

                found.add(out);
            }

            // send is much common
            if (out instanceof SendDefinition) {
                SendDefinition send = (SendDefinition) out;
                List<ProcessorDefinition> children = send.getOutputs();
                doFindType(children, type, found);
            }

            // special for choice
            if (out instanceof ChoiceDefinition) {
View Full Code Here

TOP

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

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.