Package org.apache.camel.model.dataformat

Examples of org.apache.camel.model.dataformat.BindyDataFormat


public class CamelBindyTest extends AbstractFeatureTest {

    public static final String COMPONENT = extractName(CamelBindyTest.class);
   
    protected DataFormatDefinition createDataformatDefinition(String format) {       
        BindyDataFormat dataformate = new BindyDataFormat();
        dataformate.setPackages(new String[]{"Dummy"});
        return dataformate;
    }
View Full Code Here


    protected RouteBuilder createRouteBuilder() {

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setType(BindyType.Csv);
                bindy.setClassType(NumberModel.class);
                bindy.setLocale("en");

                from(URI_DIRECT_START)
                    .unmarshal(bindy)
                    .to(URI_MOCK_RESULT);
            }
View Full Code Here

    protected RouteBuilder createRouteBuilder() {

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setType(BindyType.Csv);
                bindy.setClassType(NumberModel.class);
                bindy.setLocale("en");

                from(URI_DIRECT_START)
                    .unmarshal(bindy)
                    .to(URI_MOCK_RESULT);
            }
View Full Code Here

    // ROUTES
    // *************************************************************************

    public static class ContextConfig extends RouteBuilder {
        public void configure() {
            BindyDataFormat bindy = new BindyDataFormat();
            bindy.setClassType(Record.class);
            bindy.setLocale("en");
            bindy.setType(BindyType.Fixed);

            from(URI_DIRECT_MARSHALL)
                .marshal(bindy)
                .to(URI_MOCK_MARSHALL_RESULT);
            from(URI_DIRECT_UNMARSHALL)
View Full Code Here

    }

    public static class ContextConfig extends RouteBuilder {

        public void configure() {
            BindyDataFormat bindy = new BindyDataFormat();
            bindy.setLocale("en");
            bindy.setPackages(new String[] {"org.apache.camel.dataformat.bindy.model.simple.oneclass"});
            bindy.setType(BindyType.Csv);

            from("direct:start").
                marshal(bindy)
                .to("mock:result");
        }
View Full Code Here

    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setClassType(Order.class);
                bindy.setLocale("en");
                bindy.setType(BindyType.Fixed);

                from(URI_DIRECT_MARSHALL)
                    .marshal(bindy)
                    .to(URI_MOCK_MARSHALL_RESULT);
           
View Full Code Here

    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setPackages(new String[]{"org.apache.camel.dataformat.bindy.fixed.link"});
                bindy.setLocale("en");
                bindy.setType(BindyType.Fixed);

                from(URI_DIRECT_UNMARSHALL)
                        .unmarshal(bindy)
                        .to(URI_MOCK_UNMARSHALL_RESULT);
            }
View Full Code Here

    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setLocale("en");
                bindy.setClassType(BindyFixedLengthDynamicFieldTest.Order.class);
                bindy.setType(BindyType.Fixed);

                from(URI_DIRECT_MARSHALL)
                    .marshal(bindy)
                    .to(URI_MOCK_MARSHALL_RESULT);
           
View Full Code Here

    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setClassType(BindySimpleIgnoreTrailingCharsTest.Order.class);
                bindy.setLocale("en");
                bindy.setType(BindyType.Fixed);

                from(URI_DIRECT_MARSHALL)
                    .marshal(bindy)
                    .to(URI_MOCK_MARSHALL_RESULT);
View Full Code Here

            // default should errors go to mock:error
            errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));

            onException(Exception.class).maximumRedeliveries(0).handled(true);

            BindyDataFormat bindy = new BindyDataFormat();
            bindy.setLocale("en");
            bindy.setPackages(new String[] {"org.apache.camel.dataformat.bindy.fixed.marshall.simple"});
            bindy.setType(BindyType.Fixed);

            from(URI_DIRECT_START)
                    .marshal(bindy)
                    .to(URI_MOCK_RESULT);
        }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.dataformat.BindyDataFormat

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.