Package org.apache.camel.model

Examples of org.apache.camel.model.ToDefinition


        mockCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                // match when sending to mocks
                if (definition instanceof ToDefinition) {
                    ToDefinition to = (ToDefinition) definition;
                    return to.getUriOrRef().startsWith("mock");
                }
                return false;
            }
        };
View Full Code Here


            FromDefinition fromType = (FromDefinition)node;
            this.tooltop = fromType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof ToDefinition) {
            ToDefinition toType = (ToDefinition)node;
            this.tooltop = toType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.edgeLabel = "";
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof FilterDefinition) {
            this.image = imagePrefix + "MessageFilterIcon.png";
View Full Code Here

        Object key = node;
        if (node instanceof FromDefinition) {
            FromDefinition fromType = (FromDefinition) node;
            key = fromType.getUriOrRef();
        } else if (node instanceof ToDefinition) {
            ToDefinition toType = (ToDefinition) node;
            key = toType.getUriOrRef();
        }
        NodeData answer = nodeMap.get(key);
        if (answer == null) {
            String id = "node" + (nodeMap.size() + 1);
            answer = new NodeData(id, node, imagePrefix);
View Full Code Here

            FromDefinition fromType = (FromDefinition)node;
            this.tooltop = fromType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof ToDefinition) {
            ToDefinition toType = (ToDefinition)node;
            this.tooltop = toType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.edgeLabel = "";
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof FilterDefinition) {
            this.image = imagePrefix + "MessageFilterIcon.png";
View Full Code Here

        }
    }

    private void initToAsync(List<ProcessorDefinition> lower) {
        List<ProcessorDefinition> outputs = new ArrayList<ProcessorDefinition>();
        ToDefinition toAsync = null;

        for (ProcessorDefinition output : lower) {
            if (toAsync != null) {
                // add this output on toAsync
                toAsync.getOutputs().add(output);
            } else {
                // regular outputs
                outputs.add(output);
            }

            if (output instanceof ToDefinition) {
                ToDefinition to = (ToDefinition) output;
                if (to.isAsync() != null && to.isAsync()) {
                    // new current to async
                    toAsync = to;
                }
            }
        }
View Full Code Here

            FromDefinition fromType = (FromDefinition)node;
            this.tooltop = fromType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof ToDefinition) {
            ToDefinition toType = (ToDefinition)node;
            this.tooltop = toType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.edgeLabel = "";
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof FilterDefinition) {
            this.image = imagePrefix + "MessageFilterIcon.png";
View Full Code Here

        public Processor createProcessor(RouteContext routeContext, ProcessorDefinition definition) throws Exception {
            if (definition instanceof SplitDefinition) {
                // add additional output to the splitter
                SplitDefinition split = (SplitDefinition) definition;
                split.addOutput(new ToDefinition("mock:extra"));
            }

            if (definition instanceof SetBodyDefinition) {
                SetBodyDefinition set = (SetBodyDefinition) definition;
                set.setExpression(new ConstantExpression("body was altered"));
View Full Code Here

        public Processor createProcessor(RouteContext routeContext, ProcessorDefinition<?> definition) throws Exception {
            if (definition instanceof SplitDefinition) {
                // add additional output to the splitter
                SplitDefinition split = (SplitDefinition) definition;
                split.addOutput(new ToDefinition("mock:extra"));
            }

            if (definition instanceof SetBodyDefinition) {
                SetBodyDefinition set = (SetBodyDefinition) definition;
                set.setExpression(new ConstantExpression("body was altered"));
View Full Code Here

        Object key = node;
        if (node instanceof FromDefinition) {
            FromDefinition fromType = (FromDefinition) node;
            key = fromType.getUriOrRef();
        } else if (node instanceof ToDefinition) {
            ToDefinition toType = (ToDefinition) node;
            key = toType.getUriOrRef();
        }
        NodeData answer = nodeMap.get(key);
        if (answer == null) {
            String id = "node" + (nodeMap.size() + 1);
            answer = new NodeData(id, node, imagePrefix);
View Full Code Here

            FromDefinition fromType = (FromDefinition)node;
            this.tooltop = fromType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof ToDefinition) {
            ToDefinition toType = (ToDefinition)node;
            this.tooltop = toType.getLabel();
            this.label = removeQueryString(this.tooltop);
            this.edgeLabel = "";
            this.url = "http://camel.apache.org/message-endpoint.html";
        } else if (node instanceof FilterDefinition) {
            this.image = imagePrefix + "MessageFilterIcon.png";
View Full Code Here

TOP

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

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.