Package org.apache.camel

Examples of org.apache.camel.CamelContext.addComponent()


    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();

        // START SNIPPET: example
        camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false"));
        // END SNIPPET: example

        return camelContext;
    }
View Full Code Here


    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();

        PropertiesComponent pc = new PropertiesComponent();
        pc.setLocation("classpath:org/apache/camel/component/properties/myproperties.properties");
        context.addComponent("properties", pc);

        Properties initial = new Properties();
        initial.put("first", "mock:first");
        initial.put("second", "second");
        pc.setInitialProperties(initial);
View Full Code Here

*/
public class Starter {

    public void run() throws Exception {
        CamelContext context = new DefaultCamelContext();
        context.addComponent("properties", new PropertiesComponent("sampleconfig.properties"));
        context.addRoutes(new OrderRouteBuilder());
        context.start();
        System.in.read();
        context.stop();
    }
View Full Code Here

   
    public void run() throws Exception {
        CamelContext context = new DefaultCamelContext();
        JmsConfiguration jmsConfig = new JmsConfiguration(new ActiveMQConnectionFactory("tcp://localhost:61616"));
        context.addComponent("jms", new JmsComponent(jmsConfig ));
        context.setTracing(true);
        context.addRoutes(new Jms2RestRoute());
        context.start();
        System.in.read();
        context.stop();
View Full Code Here

    }

    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();
        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
        camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
        return camelContext;
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
View Full Code Here

        CamelContext camelContext = super.createCamelContext();
        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
        JmsComponent jmsComponent = jmsComponentAutoAcknowledge(connectionFactory);
        jmsComponent.getConfiguration().setReplyTo("baz");
        jmsComponent.getConfiguration().setReplyToOverride("bar");
        camelContext.addComponent("jms", jmsComponent);
        return camelContext;
    }

    private class Responder implements Runnable {
View Full Code Here

        CamelContext camelContext = new DefaultCamelContext();
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUri);
        SjmsComponent component = new SjmsComponent();
        component.setConnectionFactory(connectionFactory);
        component.setDestinationCreationStrategy(new TestDestinationCreationStrategyTest());
        camelContext.addComponent("sjms", component);
        return camelContext;
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
View Full Code Here

       
       
        dockerConfiguration.setClient(getClientProfile(), dockerClient);
       
        DockerComponent dockerComponent = new DockerComponent(dockerConfiguration);
        camelContext.addComponent("docker", dockerComponent);
       

       
        return camelContext;
    }
View Full Code Here

    }
   
    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();

        camelContext.addComponent("async", new MyAsyncComponent());

        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
                "vm://broker?broker.persistent=false&broker.useJmx=false");
        SjmsComponent component = new SjmsComponent();
        component.setConnectionFactory(connectionFactory);
View Full Code Here

        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
                "vm://broker?broker.persistent=false&broker.useJmx=false");
        SjmsComponent component = new SjmsComponent();
        component.setConnectionFactory(connectionFactory);
        camelContext.addComponent("sjms", component);

        return camelContext;
    }

    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.