Package org.apache.camel

Examples of org.apache.camel.EndpointConfiguration


    }

    @Test
    public void testComponentConfiguration() throws Exception {
        LogComponent comp = context.getComponent("log", LogComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("log:foo?level=DEBUG");

        assertEquals("DEBUG", conf.getParameter("level"));

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


    }

    @Test
    public void testComponentConfiguration() throws Exception {
        DirectComponent comp = context.getComponent("direct", DirectComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("direct:foo?block=true");

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

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        LanguageComponent comp = context.getComponent("language", LanguageComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("language:simple:foo?transform=false");

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

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        BeanComponent comp = context.getComponent("bean", BeanComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("bean:foo?method=bar");

        assertEquals("bar", conf.getParameter("method"));

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

    }

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

    }

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

    }

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

    }

    @Test
    public void testComponentConfiguration() throws Exception {
        DataFormatComponent comp = context.getComponent("dataformat", DataFormatComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("dataformaat:marshal:string?charset=iso-8859-1");

        assertEquals("iso-8859-1", conf.getParameter("charset"));

        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

        if (LOG.isTraceEnabled()) {
            LOG.trace("Lookup for Component handling \"{}:\" configuration returned {}",
                new Object[]{scheme, component != null ? component.getClass().getName() : "<null>"});
        }
        if (component != null) {
            EndpointConfiguration config = component.createConfiguration(scheme);
            if (config instanceof DefaultEndpointConfiguration) {
                ((DefaultEndpointConfiguration) config).setURI(uri);
            }
            return config;
        } else {
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.