Package org.apache.camel.model

Examples of org.apache.camel.model.PollEnrichDefinition


        }
        buffer.append(")");
    }

    private static void renderPollEnrich(StringBuilder buffer, OutputDefinition out) {
        PollEnrichDefinition pollEnrich = (PollEnrichDefinition)out;
        buffer.append("(\"");
        buffer.append(pollEnrich.getResourceUri()).append("\", ").append(pollEnrich.getTimeout());
        if (pollEnrich.getAggregationStrategy() != null) {
            buffer.append(", An aggregationStrategy instance here");
        }
        buffer.append(")");
    }
View Full Code Here


        }
        buffer.append(")");
    }

    private static void renderPollEnrich(StringBuilder buffer, OutputDefinition out) {
        PollEnrichDefinition pollEnrich = (PollEnrichDefinition)out;
        buffer.append("(\"");
        buffer.append(pollEnrich.getResourceUri()).append("\", ").append(pollEnrich.getTimeout());
        if (pollEnrich.getAggregationStrategy() != null) {
            buffer.append(", An aggregationStrategy instance here");
        }
        buffer.append(")");
    }
View Full Code Here

        }
        buffer.append(")");
    }

    private static void renderPollEnrich(StringBuilder buffer, OutputDefinition<?> out) {
        PollEnrichDefinition pollEnrich = (PollEnrichDefinition)out;
        buffer.append("(\"");
        buffer.append(pollEnrich.getResourceUri()).append("\", ").append(pollEnrich.getTimeout());
        if (pollEnrich.getAggregationStrategy() != null) {
            buffer.append(", An aggregationStrategy instance here");
        }
        buffer.append(")");
    }
View Full Code Here

        }
        buffer.append(")");
    }

    private static void renderPollEnrich(StringBuilder buffer, OutputDefinition out) {
        PollEnrichDefinition pollEnrich = (PollEnrichDefinition)out;
        buffer.append("(\"");
        buffer.append(pollEnrich.getResourceUri()).append("\", ").append(pollEnrich.getTimeout());
        if (pollEnrich.getAggregationStrategy() != null) {
            buffer.append(", An aggregationStrategy instance here");
        }
        buffer.append(")");
    }
View Full Code Here

    }

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

        answer.setResourceUri(toXmlPropertyValue(PROPERTY_RESOURCEURI, this.getResourceUri()));
        answer.setTimeout(toXmlPropertyValue(PROPERTY_TIMEOUT, this.getTimeout()));
        answer.setAggregationStrategyRef(toXmlPropertyValue(PROPERTY_AGGREGATIONSTRATEGYREF, this.getAggregationStrategyRef()));
        answer.setAggregationStrategyMethodName(toXmlPropertyValue(PROPERTY_AGGREGATIONSTRATEGYMETHODNAME, this.getAggregationStrategyMethodName()));
        answer.setAggregationStrategyMethodAllowNull(toXmlPropertyValue(PROPERTY_AGGREGATIONSTRATEGYMETHODALLOWNULL, this.getAggregationStrategyMethodAllowNull()));

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

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

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

            this.setResourceUri(node.getResourceUri());
            this.setTimeout(node.getTimeout());
            this.setAggregationStrategyRef(node.getAggregationStrategyRef());
            this.setAggregationStrategyMethodName(node.getAggregationStrategyMethodName());
            this.setAggregationStrategyMethodAllowNull(node.getAggregationStrategyMethodAllowNull());
        } else {
            throw new IllegalArgumentException("ProcessorDefinition not an instanceof PollEnrichDefinition. Was " + processor.getClass().getName());
        }
    }
View Full Code Here

TOP

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

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.