Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration


        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);

        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
    }
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

        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);

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

        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);

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

        XsltComponent comp = context.getComponent("xslt", XsltComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("xslt:foo?deleteOutputFile=true");

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

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

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

        BrowseComponent comp = context.getComponent("browse", BrowseComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("browse:seda:foo?synchronous=true");

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

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

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

        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);

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

        EndpointConfiguration conf = comp.createConfiguration("controlbus:route?routeId=bar&action=stop");

        assertEquals("bar", conf.getParameter("routeId"));
        assertEquals("stop", conf.getParameter("action"));

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

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

        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);

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

        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);

        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
        assertTrue(json.contains("\"dataTimeout\": { \"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.