Package org.apache.camel

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


        ISay proxy = ProxyHelper.createProxy(endpoint, ISay.class);
        String rc = proxy.say();
        assertEquals("Good Bye!", rc);
        // END SNIPPET: invoke

        camelContext.stop();
    }
}
View Full Code Here


        // now lets sleep for a while
        boolean received = latch.await(5, TimeUnit.SECONDS);
        assertTrue("Did not receive the message!", received);

        context.stop();
    }


    public void testThatShowsEndpointResolutionIsNotConsistent() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
View Full Code Here

        // now lets sleep for a while
        boolean received = latch.await(5, TimeUnit.SECONDS);
        assertTrue("Did not receive the message!", received);

        context.stop();
    }

}
View Full Code Here

        producer.process(exchange);

        // now lets sleep for a while
        assertTrue("Did not receive the message!", invoked.get());

        container.stop();
    }
}
View Full Code Here

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

        camelContext.stop();
    }
}
View Full Code Here

        ISay proxy = ProxyHelper.createProxy(endpoint, ISay.class);
        String rc = proxy.say();
        assertEquals("Good Bye!", rc);
        // END SNIPPET: invoke

        camelContext.stop();
    }

    private boolean classPathHasSpaces() {
        ClassLoader cl = getClass().getClassLoader();
        if (cl instanceof URLClassLoader) {
View Full Code Here

                template.sendBodyAndHeaders("direct:in", payload, headers);
            }
            assertMockEndpointsSatisfied();
            return mock.getReceivedExchanges().get(0);
        } finally {
            context.stop();
        }
    }

    @Before
    public void setUp() throws Exception {
View Full Code Here

        ISay proxy = (ISay) applicationContext.getBean("sayProxy");
        String rc = proxy.say();
        assertEquals("Hello", rc);
        // END SNIPPET: invoke

        camelContext.stop();
        applicationContext.destroy();
    }

    protected ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext("org/apache/camel/spring/remoting/spring.xml");
View Full Code Here

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onContextStart", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                                                    "onServiceAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onContextStop");
       
        assertEquals(expectedEvents, dummy1.getEvents());
View Full Code Here

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onContextStart", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                                                    "onServiceAdd", "onServiceAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onContextStop");
       
        assertEquals(expectedEvents, dummy1.getEvents());
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.