Package org.apache.camel

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


                });
            }
        });

       
        context.start();

        // now lets fire in a message
        Endpoint<Exchange> endpoint = context.getEndpoint("seda:test.a");
        Exchange exchange = endpoint.createExchange();
        exchange.getIn().setHeader("cheese", 123);
View Full Code Here


                });
            }
        });


        context.start();

        // now lets fire in a message
        Endpoint<Exchange> endpoint = context.getEndpoint("seda:test.a");
        Exchange exchange = endpoint.createExchange();
        exchange.getIn().setHeader("cheese", 123);
View Full Code Here

                 * .add(interceptor2) .target().to("direct:d");
                 */
            }
        };
        container.addRoutes(builder);
        container.start();

        Endpoint<Exchange> endpoint = container.getEndpoint("direct:a");
        Exchange exchange = endpoint.createExchange();
        Producer<Exchange> producer = endpoint.createProducer();
        producer.process(exchange);
View Full Code Here

                    }
                });
            }
        });

        container.start();

        // now lets fire in a message
        Endpoint<Exchange> endpoint = container.getEndpoint("direct:test.a");
        Exchange exchange = endpoint.createExchange();
        exchange.getIn().setHeader("cheese", 123);
View Full Code Here

            public void configure() {
                from("timer://foo?fixedRate=true&delay=0&period=500").to("pojo:bar");
            }
        });

        camelContext.start();

        // now lets wait for the timer to fire a few times.
        Thread.sleep(1000 * 2);
        assertTrue("", hitCount.get() >= 3);

View Full Code Here

                from(bye).to("pojo:bye");
            }
        });
        // END SNIPPET: route

        camelContext.start();

        // START SNIPPET: invoke
        Endpoint endpoint = camelContext.getEndpoint("direct:hello");
        ISay proxy = ProxyHelper.createProxy(endpoint, ISay.class);
        String rc = proxy.say();
View Full Code Here

    public Exchange doSignatureRouteTest(RouteBuilder builder, Exchange e,
                                         Map<String, Object> headers) throws Exception {
        CamelContext context = new DefaultCamelContext();
        try {
            context.addRoutes(builder);
            context.start();

            MockEndpoint mock = context.getEndpoint("mock:result",
                                                    MockEndpoint.class);
            mock.setExpectedMessageCount(1);
View Full Code Here

        return context;
    }

    public void testMultipleLifecycleStrategies() throws Exception {
        CamelContext context = createCamelContext();
        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
View Full Code Here

        return context;
    }

    public void testMultipleLifecycleStrategies() throws Exception {
        CamelContext context = createCamelContext();
        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
View Full Code Here

            });

            final ProducerTemplate<Exchange> template = context.createProducerTemplate();

            final Endpoint e = context.getEndpoint("direct:a");
            context.start();

            for (int i = 0; i < ITERS; i++) {
                template.send(e, new SendingProcessor(i), new AsyncCallback() {
                    public void done(boolean arg0) {
                        // Do nothing here
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.