Examples of addRoutes()


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

        CamelContext camelContext = new DefaultCamelContext(context);
        // END SNIPPET: register

        // START SNIPPET: route
        // lets add simple route
        camelContext.addRoutes(new RouteBuilder() {
            public void configure() {
                from("direct:hello").to("rmi://localhost:9876/bye");

                // When exposing an RMI endpoint, the interfaces it exposes must
                // be configured.
View Full Code Here

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

        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);
       
        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:test-session").policy(new DroolsPolicy()).unmarshal("json").to("drools://testnode/ksession").marshal("json");
                from("direct:unmarshall").policy(new DroolsPolicy()).unmarshal("json");
                from("direct:marshall").policy(new DroolsPolicy()).marshal("json");
View Full Code Here

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

        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);

        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {         
                JaxbDataFormat jdf = new JaxbDataFormat();
                jdf.setContextPath("org.drools.camel.testdomain");
                jdf.setPrettyPrint(true);
View Full Code Here

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

        // Start the bank server
        BankServer bankServer = new BankServer();
        bankServer.start();

        // Start the camel context
        context.addRoutes(new LoanBroker());
        context.start();

        // Start the loan broker
        Thread.sleep(5 * 60 * 1000);
        context.stop();
View Full Code Here

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

        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");

        // Note we can explicitly name the component
        context.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

        context.addRoutes(new LoanBroker());
        // Start the loan broker
        context.start();
        System.out.println("Server is ready");

        Thread.sleep(5 * 60 * 1000);
 
View Full Code Here

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

    public void testNoXsltFile() throws Exception {
        try {
            RouteBuilder builder = createRouteBuilder();
            CamelContext context = new DefaultCamelContext();
            context.addRoutes(builder);
            context.start();

            fail("Should have thrown an exception due XSLT file not found");
        } catch (FailedToCreateRouteException e) {
            // expected
View Full Code Here

Examples of org.apache.camel.impl.DefaultCamelContext.addRoutes()

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

Examples of org.apache.camel.impl.DefaultCamelContext.addRoutes()

   
    public void run() throws Exception {
        CamelContext context = new DefaultCamelContext();
        addJmsComponent(context);
        context.setTracing(true);
        context.addRoutes(new Jpa2JmsRoute());
        context.start();
        System.in.read();
        context.stop();
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultCamelContext.addRoutes()

    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

Examples of org.apache.camel.impl.DefaultCamelContext.addRoutes()

        twitterComponent.setConsumerKey("");
        twitterComponent.setConsumerSecret("");
        twitterComponent.setAccessToken("");
        twitterComponent.setAccessTokenSecret("");
        context.setTracing(true);
        context.addRoutes(new VotingRoutes());
        context.start();
        System.in.read();
        context.stop();
    }
   
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.