Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration


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

        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

        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

        EndpointConfiguration conf = comp.createConfiguration("ftp: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

        EndpointConfiguration conf = comp.createConfiguration("sftp: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("\"download\": { \"type\": \"boolean\" }"));
    }
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

        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

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.