Package org.apache.camel.model

Examples of org.apache.camel.model.DataFormatDefinition


            buffer.append("(\"").append(interceptSend.getUri()).append("\")");
            if (interceptSend.getSkipSendToOriginalEndpoint()) {
                buffer.append(".skipSendToOriginalEndpoint()");
            }
        } else if (out instanceof MarshalDefinition) {
            DataFormatDefinition dataFormat = ((MarshalDefinition)out).getDataFormatType();
            XmlRootElement xmlRoot = dataFormat.getClass().getAnnotation(XmlRootElement.class);
            buffer.append("().").append(xmlRoot.name()).append("()");
        } else if (out instanceof MulticastDefinition) {
            buffer.append("()");
        } else if (out instanceof OtherwiseDefinition) {
            buffer.append("()");
        } else if (out instanceof PipelineDefinition) {
            // transformed into simple ToDefinition
        } else if (out instanceof PolicyDefinition) {
            renderPolicy(buffer, out);
        } else if (out instanceof PollEnrichDefinition) {
            renderPollEnrich(buffer, out);
        } else if (out instanceof ProcessDefinition) {
            renderProcess(buffer, out);
        } else if (out instanceof RemoveHeaderDefinition) {
            RemoveHeaderDefinition remove = (RemoveHeaderDefinition)out;
            buffer.append("(\"").append(remove.getHeaderName()).append("\")");
        } else if (out instanceof RemovePropertyDefinition) {
            RemovePropertyDefinition remove = (RemovePropertyDefinition)out;
            buffer.append("(\"").append(remove.getPropertyName()).append("\")");
        } else if (out instanceof SetExchangePatternDefinition) {
            SetExchangePatternDefinition setEP = (SetExchangePatternDefinition)out;
            buffer.append("(ExchangePattern.");
            buffer.append(setEP.getPattern().toString());
            buffer.append(")");
        } else if (out instanceof SortDefinition) {
            SortDefinition sort = (SortDefinition)out;
            buffer.append("(");
            ExpressionRenderer.renderExpression(buffer, sort.getExpression().toString());
            buffer.append(")");
        } else if (out instanceof StopDefinition) {
            buffer.append("()");
        } else if (out instanceof ThreadsDefinition) {
            renderThreads(buffer, out);
        } else if (out instanceof TransactedDefinition) {
            renderTransacted(buffer, out);
        } else if (out instanceof TryDefinition) {
            buffer.append("()");
        } else if (out instanceof UnmarshalDefinition) {
            DataFormatDefinition dataFormat = ((UnmarshalDefinition)out).getDataFormatType();
            XmlRootElement xmlRoot = dataFormat.getClass().getAnnotation(XmlRootElement.class);
            buffer.append("().").append(xmlRoot.name()).append("()");
        }
    }
View Full Code Here


    protected void testDataFormat(String format) throws Exception {
        long max = System.currentTimeMillis() + 10000;
        while (true) {
            try {
                DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format);               
                assertNotNull(dataFormatDefinition);
                assertNotNull(dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext())));
                return;
            } catch (Exception t) {
                if (System.currentTimeMillis() < max) {
                    Thread.sleep(1000);
                    continue;
View Full Code Here

        return getDataFormat(name, context);
    }

    public DataFormatDefinition resolveDataFormatDefinition(String name, CamelContext context) {
        // lookup type and create the data format from it
        DataFormatDefinition type = lookup(context, name, DataFormatDefinition.class);
        if (type == null && context.getDataFormats() != null) {
            type = context.getDataFormats().get(name);
        }
        return type;
    }
View Full Code Here

        return getDataFormat(name, context);
    }

    public DataFormatDefinition resolveDataFormatDefinition(String name, CamelContext context) {
        // lookup type and create the data format from it
        DataFormatDefinition type = lookup(context, name, DataFormatDefinition.class);
        if (type == null && context.getDataFormats() != null) {
            type = context.getDataFormats().get(name);
        }
        return type;
    }
View Full Code Here

    protected void testDataFormat(String format) throws Exception {
        long max = System.currentTimeMillis() + 10000;
        while (true) {
            try {
                DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format);               
                assertNotNull(dataFormatDefinition);
                assertNotNull(dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext())));
                return;
            } catch (Exception t) {
                if (System.currentTimeMillis() < max) {
                    Thread.sleep(1000);
                    continue;
View Full Code Here

        return dataFormatResolver.resolveDataFormat(name, this);
    }

    public DataFormatDefinition resolveDataFormatDefinition(String name) {
        // lookup type and create the data format from it
        DataFormatDefinition type = lookup(this, name, DataFormatDefinition.class);
        if (type == null && getDataFormats() != null) {
            type = getDataFormats().get(name);
        }
        return type;
    }
View Full Code Here

        return dataFormatResolver.resolveDataFormat(name, this);
    }

    public DataFormatDefinition resolveDataFormatDefinition(String name) {
        // lookup type and create the data format from it
        DataFormatDefinition type = lookup(this, name, DataFormatDefinition.class);
        if (type == null && getDataFormats() != null) {
            type = getDataFormats().get(name);
        }
        return type;
    }
View Full Code Here

            buffer.append("(\"").append(interceptSend.getUri()).append("\")");
            if (interceptSend.getSkipSendToOriginalEndpoint()) {
                buffer.append(".skipSendToOriginalEndpoint()");
            }
        } else if (out instanceof MarshalDefinition) {
            DataFormatDefinition dataFormat = ((MarshalDefinition)out).getDataFormatType();
            XmlRootElement xmlRoot = dataFormat.getClass().getAnnotation(XmlRootElement.class);
            buffer.append("().").append(xmlRoot.name()).append("()");
        } else if (out instanceof MulticastDefinition) {
            buffer.append("()");
        } else if (out instanceof OtherwiseDefinition) {
            buffer.append("()");
        } else if (out instanceof PipelineDefinition) {
            // transformed into simple ToDefinition
        } else if (out instanceof PolicyDefinition) {
            renderPolicy(buffer, out);
        } else if (out instanceof PollEnrichDefinition) {
            renderPollEnrich(buffer, out);
        } else if (out instanceof ProcessDefinition) {
            renderProcess(buffer, out);
        } else if (out instanceof RemoveHeaderDefinition) {
            RemoveHeaderDefinition remove = (RemoveHeaderDefinition)out;
            buffer.append("(\"").append(remove.getHeaderName()).append("\")");
        } else if (out instanceof RemovePropertyDefinition) {
            RemovePropertyDefinition remove = (RemovePropertyDefinition)out;
            buffer.append("(\"").append(remove.getPropertyName()).append("\")");
        } else if (out instanceof SetExchangePatternDefinition) {
            SetExchangePatternDefinition setEP = (SetExchangePatternDefinition)out;
            buffer.append("(ExchangePattern.");
            buffer.append(setEP.getPattern().toString());
            buffer.append(")");
        } else if (out instanceof SortDefinition) {
            SortDefinition sort = (SortDefinition)out;
            buffer.append("(");
            ExpressionRenderer.renderExpression(buffer, sort.getExpression().toString());
            buffer.append(")");
        } else if (out instanceof StopDefinition) {
            buffer.append("()");
        } else if (out instanceof ThreadsDefinition) {
            renderThreads(buffer, out);
        } else if (out instanceof TransactedDefinition) {
            renderTransacted(buffer, out);
        } else if (out instanceof TryDefinition) {
            buffer.append("()");
        } else if (out instanceof UnmarshalDefinition) {
            DataFormatDefinition dataFormat = ((UnmarshalDefinition)out).getDataFormatType();
            XmlRootElement xmlRoot = dataFormat.getClass().getAnnotation(XmlRootElement.class);
            buffer.append("().").append(xmlRoot.name()).append("()");
        }
    }
View Full Code Here

    protected void testDataFormat(String format) throws Exception {
       
        long max = System.currentTimeMillis() + 10000;
        while (true) {
            try {
                DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format);               
                assertNotNull(dataFormatDefinition);
                assertNotNull(dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext())));
                return;
            } catch (Exception t) {
                if (System.currentTimeMillis() < max) {
                    Thread.sleep(1000);
                    continue;
View Full Code Here

    protected void testDataFormat(String format) throws Exception {
        long max = System.currentTimeMillis() + 10000;
        while (true) {
            try {
                DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format);               
                assertNotNull(dataFormatDefinition);
                assertNotNull(dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext())));
                return;
            } catch (Exception t) {
                if (System.currentTimeMillis() < max) {
                    Thread.sleep(1000);
                    continue;
View Full Code Here

TOP

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

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.