Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration


        EndpointConfiguration conf = comp.createConfiguration("sftp:127.0.0.1?username=foo&password=secret");

        assertEquals("foo", conf.getParameter("username"));
        assertEquals("secret", conf.getParameter("password"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
        assertTrue(json.contains("\"download\": { \"type\": \"boolean\" }"));
    }
View Full Code Here


        EndpointConfiguration conf = comp.createConfiguration("ftp:127.0.0.1?username=foo&password=secret");

        assertEquals("foo", conf.getParameter("username"));
        assertEquals("secret", conf.getParameter("password"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
        assertTrue(json.contains("\"dataTimeout\": { \"type\": \"int\" }"));
    }
View Full Code Here

        DirectVmComponent comp = context.getComponent("direct-vm", DirectVmComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("direct-vm:foo?block=false");

        assertEquals("false", conf.getParameter("block"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
    }
View Full Code Here

        MockComponent comp = context.getComponent("mock", MockComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("mock:foo?retainFirst=10");

        assertEquals("10", conf.getParameter("retainFirst"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"expectedCount\": { \"type\": \"int\" }"));
        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
    }
View Full Code Here

        TimerComponent comp = context.getComponent("timer", TimerComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("timer:foo?period=2000");

        assertEquals("2000", conf.getParameter("period"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"timerName\": { \"type\": \"java.lang.String\" }"));
        assertTrue(json.contains("\"delay\": { \"type\": \"long\" }"));
    }
View Full Code Here

        TestComponent comp = context.getComponent("test", TestComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("test:my:foo?timeout=1000");

        assertEquals("1000", conf.getParameter("timeout"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
    }
View Full Code Here

        FileComponent comp = context.getComponent("file", FileComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("file:target/foo?delete=true");

        assertEquals("true", conf.getParameter("delete"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"exclude\": { \"type\": \"java.lang.String\" }"));
        assertTrue(json.contains("\"delete\": { \"type\": \"boolean\" }"));
    }
View Full Code Here

        TwitterComponent comp = context.getComponent("twitter", TwitterComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("twitter:search?keywords=camel");

        assertEquals("camel", conf.getParameter("keywords"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"accessToken\": { \"type\": \"java.lang.String\" }"));
        assertTrue(json.contains("\"consumerKey\": { \"type\": \"java.lang.String\" }"));
    }
View Full Code Here

        SedaComponent comp = context.getComponent("seda", SedaComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("seda:foo?blockWhenFull=true");

        assertEquals("true", conf.getParameter("blockWhenFull"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"blockWhenFull\": { \"type\": \"boolean\" }"));
    }
View Full Code Here

        DataSetComponent comp = context.getComponent("dataset", DataSetComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3");

        assertEquals("3", conf.getParameter("minRate"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"preloadSize\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"minRate\": { \"type\": \"int\" }"));
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.ComponentConfiguration

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.