Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration


        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


        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

        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

        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

        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

        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

        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

        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

        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

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.