Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration


        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);
        assertTrue(json.contains("\"deep\": { \"type\": \"boolean\""));
        assertTrue(json.contains("\"eventTypes\": { \"type\": \"integer\""));
        assertTrue(json.contains("\"noLocal\": { \"type\": \"boolean\""));
View Full Code Here


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

        assertTrue(json.contains("\"lat\": { \"type\": \"string\""));
        assertTrue(json.contains("\"location\": { \"type\": \"string\""));
        assertTrue(json.contains("\"mode\": { \"type\": \"string\", \"javaType\": \"org.apache.camel.component.weather.WeatherMode\", \"enum\": [ \"HTML\", \"JSON\", \"XML\" ]"));
View Full Code Here

        EndpointConfiguration configuration = component.createConfiguration("optaplanner:org/apache/camel/component/optaplanner/solverConfig.xml?"
                + "synchronous=false&contentCache=true");

        assertEquals("true", configuration.getParameter("contentCache"));

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

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

            + "&stateful=true&deleteJob=false");

        assertEquals("true", conf.getParameter("stateful"));
        assertEquals("false", conf.getParameter("deleteJob"));

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

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

        EndpointConfiguration conf = comp.createConfiguration("cxf:bean:cxfEndpoint?wsdlURL=wsdl/hello_world.wsdl&dataFormat=PAYLOAD");

        assertEquals("PAYLOAD", conf.getParameter("dataFormat"));
        assertEquals("wsdl/hello_world.wsdl", conf.getParameter("wsdlURL"));

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

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

        EndpointConfiguration conf = comp.createConfiguration("atmosphere-websocket://localhost:8088/hola?sendToAll=true&useStreaming=false");

        assertEquals("true", conf.getParameter("sendToAll"));
        assertEquals("false", conf.getParameter("useStreaming"));

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

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

        DataSetComponent comp = context.getComponent("dataset", DataSetComponent.class);
        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3");

        assertEquals("3", conf.getParameter("minRate"));

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

        assertTrue(json.contains("\"preloadSize\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"minRate\": { \"type\": \"int\" }"));
    }
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\": \"java.lang.String\" }"));
        assertTrue(json.contains("\"transacted\": { \"type\": \"boolean\" }"));
    }
View Full Code Here

        if (completionText == null) {
            completionText = "";
        }
        Component component = context.getComponent(componentName, false);
        if (component != null) {
            ComponentConfiguration configuration = component.createComponentConfiguration();
            configuration.setParameters(endpointParameters);
            return configuration.completeEndpointPath(completionText);
        } else {
            return new ArrayList<String>();
        }
    }
View Full Code Here

    }

    public String componentParameterJsonSchema(String componentName) throws Exception {
        Component component = context.getComponent(componentName);
        if (component != null) {
            ComponentConfiguration configuration = component.createComponentConfiguration();
            return configuration.createParameterJsonSchema();
        } else {
            return null;
        }
    }
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.