Package org.apache.camel

Examples of org.apache.camel.EndpointConfiguration


    }

    @Test
    public void testComponentConfiguration() throws Exception {
        HttpComponent comp = context.getComponent("http", HttpComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("http://www.google.com?proxyHost=myotherproxy&proxyPort=2345");

        assertEquals("myotherproxy", conf.getParameter("proxyHost"));
        assertEquals("2345", conf.getParameter("proxyPort"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);
View Full Code Here


    }

    @Test
    public void testComponentConfiguration() throws Exception {
        FtpComponent comp = context.getComponent("ftp", FtpComponent.class);
        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);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        JdbcComponent comp = context.getComponent("jdbc", JdbcComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("jdbc:myDataSource?useHeadersAsParameters=true&readSize=100");

        assertEquals("true", conf.getParameter("useHeadersAsParameters"));
        assertEquals("100", conf.getParameter("readSize"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        HdfsComponent comp = context.getComponent("hdfs", HdfsComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("hdfs://localhost/tmp/simple-file?"
                + "fileSystemType=LOCAL&fileType=SEQUENCE_FILE&initialDelay=0");

        assertEquals("LOCAL", conf.getParameter("fileSystemType"));
        assertEquals("SEQUENCE_FILE", conf.getParameter("fileType"));
        assertEquals("0", conf.getParameter("initialDelay"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        HdfsComponent comp = context.getComponent("hdfs2", HdfsComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("hdfs2://localhost/tmp/simple-file?"
                + "splitStrategy=IDLE:1000,BYTES:5&fileSystemType=LOCAL&fileType=ARRAY_FILE&initialDelay=0");

        assertEquals("LOCAL", conf.getParameter("fileSystemType"));
        assertEquals("ARRAY_FILE", conf.getParameter("fileType"));
        assertEquals("0", conf.getParameter("initialDelay"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        SftpComponent comp = context.getComponent("sftp", SftpComponent.class);
        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);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        MyBatisComponent comp = context.getComponent(COMPONENT_NAME, MyBatisComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("mybatis:insertAccount?statementType=Insert&maxMessagesPerPoll=5");

        assertEquals("Insert", conf.getParameter("statementType"));
        assertEquals("5", conf.getParameter("maxMessagesPerPoll"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        FtpsComponent comp = context.getComponent("ftps", FtpsComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("ftps: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);
View Full Code Here

    }
   
    @Test
    public void testComponentConfiguration() throws Exception {
        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);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        QuartzComponent comp = context.getComponent("quartz2", QuartzComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("quartz2://myGroup/myTimerName?durableJob=true&recoverableJob=true&cron=0/2+*+*+*+*+?");

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

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

View Full Code Here

TOP

Related Classes of org.apache.camel.EndpointConfiguration

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.