Examples of stopRoute()


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

        CamelContext context = startRouteWithPolicy("startPolicy");
       
        MockEndpoint mock = context.getEndpoint("mock:success", MockEndpoint.class);
        mock.expectedMinimumMessageCount(1);
       
        context.stopRoute("testRoute", 0, TimeUnit.MILLISECONDS);
       
        Thread.sleep(4000);
        assertTrue(context.getRouteStatus("testRoute") == ServiceStatus.Started);
        context.createProducerTemplate().sendBody("direct:start", "Ready or not, Here, I come");
View Full Code Here

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

        CamelContext context = startRouteWithPolicy("startPolicy");
       
        MockEndpoint mock = (MockEndpoint) context.getEndpoint("mock:success");
        mock.expectedMinimumMessageCount(1);
       
        context.stopRoute("testRoute", 0, TimeUnit.MILLISECONDS);
       
        Thread.sleep(4000);
        assertTrue(context.getRouteStatus("testRoute") == ServiceStatus.Started);
        context.createProducerTemplate().sendBody("direct:start", "Ready or not, Here, I come");
View Full Code Here

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

        final CamelContext context = exchange.getContext();
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    context.stopRoute(routeName);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }).start();
View Full Code Here

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

        CamelContext context = startRouteWithPolicy("startPolicy");
       
        MockEndpoint mock = (MockEndpoint) context.getEndpoint("mock:success");
        mock.expectedMinimumMessageCount(1);
       
        context.stopRoute("testRoute", 0, TimeUnit.MILLISECONDS);
       
        Thread.sleep(4000);
        assertTrue(context.getRouteStatus("testRoute") == ServiceStatus.Started);
        context.createProducerTemplate().sendBody("direct:start", "Ready or not, Here, I come");
View Full Code Here

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

        String start = route.getId().equals(name1) ? name2 : name1;

        CamelContext context = exchange.getContext();
        try {
            context.getInflightRepository().remove(exchange);
            context.stopRoute(stop);
            context.startRoute(start);
        } catch (Exception e) {
            // let the exception handle handle it, which is often just to log it
            getExceptionHandler().handleException("Error flipping routes", e);
        }
View Full Code Here

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

        camelContext.addRoutes(builder);
        camelContext.addRoutes(builder2);

        camelContext.start();

        camelContext.stopRoute("route2");
        camelContext.removeRoute("route2");

        MockEndpoint mock1 = (MockEndpoint) camelContext.getEndpoint("mock:route1");
        MockEndpoint mock2 = (MockEndpoint) camelContext.getEndpoint("mock:route2");
        mock1.expectedMessageCount(100);
View Full Code Here

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

     * Allows a routes builder to be updated
     */
    public void postRoutes(RouteBuilder builder) throws Exception {
        DefaultCamelContext defaultCamelContext = (DefaultCamelContext)getCamelContext();
        // stop and remove the original route
        defaultCamelContext.stopRoute(id);
        defaultCamelContext.removeRouteDefinition(id);

        // add the routes in a route builder
        defaultCamelContext.addRoutes(builder);

View Full Code Here

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

     * Allows a routes builder to be updated
     */
    public void postRoutes(RouteBuilder builder) throws Exception {
        DefaultCamelContext defaultCamelContext = (DefaultCamelContext)getCamelContext();
        // stop and remove the original route
        defaultCamelContext.stopRoute(id);
        defaultCamelContext.removeRoute(id);

        // add the routes in a route builder
        defaultCamelContext.addRoutes(builder);

View Full Code Here

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

     * Allows a routes builder to be updated
     */
    public void postRoutes(RouteBuilder builder) throws Exception {
        DefaultCamelContext defaultCamelContext = (DefaultCamelContext)getCamelContext();
        // stop and remove the original route
        defaultCamelContext.stopRoute(id);
        defaultCamelContext.removeRouteDefinition(id);

        // add the routes in a route builder
        defaultCamelContext.addRoutes(builder);

View Full Code Here

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

     * Allows a routes builder to be updated
     */
    public void postRoutes(RouteBuilder builder) throws Exception {
        DefaultCamelContext defaultCamelContext = (DefaultCamelContext)getCamelContext();
        // stop and remove the original route
        defaultCamelContext.stopRoute(id);
        defaultCamelContext.removeRouteDefinition(id);

        // add the routes in a route builder
        defaultCamelContext.addRoutes(builder);

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.