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()

        if (camelRoute == null) {
            System.err.println("Camel route " + route + " not found.");
            return null;
        }
        CamelContext camelContext = camelRoute.getRouteContext().getCamelContext();
        camelContext.stopRoute(route);
        return null;
    }

}
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()

        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 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()

        if (camelRoute == null) {
            System.err.println("Camel route " + route + " not found.");
            return null;
        }
        CamelContext camelContext = camelRoute.getRouteContext().getCamelContext();
        camelContext.stopRoute(route);
        return null;
    }

}
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()

            System.err.println("Camel routes using " + route + " not found.");
            return null;
        }
        for (Route camelRoute : camelRoutes) {
            CamelContext camelContext = camelRoute.getRouteContext().getCamelContext();
            camelContext.stopRoute(camelRoute.getId());
        }

        return null;
    }
View Full Code Here

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

        camelContext.start();

        // this test actually removes the route... so in effect we have one route consuming
        // a "multipleConsumer" seda queue
        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
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.