Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration


        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\": \"string\""));
        assertTrue(json.contains("\"delay\": { \"type\": \"integer\""));
    }
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\": \"string\""));
        assertTrue(json.contains("\"synchronous\": { \"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\": \"integer\""));
        assertTrue(json.contains("\"retainFirst\": { \"type\": \"integer\""));
    }
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

        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\": \"string\""));
        assertTrue(json.contains("\"groupInterval\": { \"type\": \"integer\""));
    }
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\": \"integer\""));
        assertTrue(json.contains("\"blockWhenFull\": { \"type\": \"boolean\""));
    }
View Full Code Here

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

        assertTrue(json.contains("\"timeout\": { \"type\": \"integer\""));
        assertTrue(json.contains("\"block\": { \"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\": \"string\""));
        assertTrue(json.contains("\"async\": { \"type\": \"boolean\""));
    }
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\": \"integer\""));
        assertTrue(json.contains("\"block\": { \"type\": \"boolean\""));
    }
View Full Code Here

        JmsComponent comp = context.getComponent("jms", JmsComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("jms:queue:foo?replyTo=bar");

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

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

        assertTrue(json.contains("\"replyToDestination\": { \"type\": \"string\""));
        assertTrue(json.contains("\"transacted\": { \"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.