Package org.apache.camel

Examples of org.apache.camel.EndpointConfiguration


    }

    @Test
    public void testComponentConfiguration() throws Exception {
        GHttpComponent comp = context.getComponent("ghttp", GHttpComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("ghttp://somewhere.com:9090/path?"
                + "bridgeEndpoint=false&throwExceptionOnFailure=false");

        assertEquals("false", conf.getParameter("bridgeEndpoint"));
        assertEquals("false", conf.getParameter("throwExceptionOnFailure"));

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


    }

    @Test
    public void testComponentConfiguration() throws Exception {
        GAuthComponent comp = context.getComponent("gauth", GAuthComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("gauth://authorize?scope=foo&name=fred");

        assertEquals("foo", conf.getParameter("scope"));
        assertEquals("fred", conf.getParameter("name"));

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        GMailComponent comp = context.getComponent("gmail", GMailComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("gmail:test1@example.org?to=test2@example.org&subject=testSubject");

        assertEquals("test2@example.org", conf.getParameter("to"));
        assertEquals("testSubject", conf.getParameter("subject"));

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        GTaskComponent comp = context.getComponent("gtask", GTaskComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("gtask:default?workerRoot=camel");

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

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        NettyHttpComponent comp = context.getComponent("netty4-http", NettyHttpComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("netty4-http:tcp://localhost:5150?sync=true"
                + "&httpMethodRestrict=POST&traceEnabled=true");

        assertEquals("true", conf.getParameter("traceEnabled"));
        assertEquals("POST", conf.getParameter("httpMethodRestrict"));

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        CxfRsComponent comp = context.getComponent("cxfrs", CxfRsComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("cxfrs:bean:cxfEndpoint?resourceClasses=org.apache.camel.rs.Example&maxClientCacheSize=32");

        assertEquals("org.apache.camel.rs.Example", conf.getParameter("resourceClasses"));
        assertEquals("32", conf.getParameter("maxClientCacheSize"));

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        JGroupsComponent comp = context.getComponent("jgroups", JGroupsComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("jgroups:clusterName?enableViewMessages=true");

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

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        SqlComponent comp = context.getComponent("sql", SqlComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("sql:select?dataSourceRef=jdbc/myDataSource&allowNamedParameters=true&consumer.delay=5000");

        assertEquals("jdbc/myDataSource", conf.getParameter("dataSourceRef"));
        assertEquals("true", conf.getParameter("allowNamedParameters"));

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

    @Test
    public void testComponentConfiguration() throws Exception {
        JcrComponent component = context.getComponent("jcr", JcrComponent.class);
        String uri = "jcr://gregor:secret@repo/home/gregor?deep=true&eventTypes=3&noLocal=false";
        EndpointConfiguration configuration = component.createConfiguration(uri);

        assertEquals("true", configuration.getParameter("deep"));
        assertEquals("3", configuration.getParameter("eventTypes"));
        assertEquals("false", configuration.getParameter("noLocal"));

        ComponentConfiguration componentConfiguration = component.createComponentConfiguration();
        String json = componentConfiguration.createParameterJsonSchema();

        assertNotNull(json);
View Full Code Here

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        WeatherComponent comp = context.getComponent("weather", WeatherComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("weather:foo?location=Madrid,Spain");

        assertEquals("Madrid,Spain", conf.getParameter("location"));

        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.