Package org.apache.camel

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


            assertEquals("Hello Camel", out);
        } finally {
            if (myTemplate != null) {
                template.stop();
            }
            camelContext.stop();
        }
       
    }

}
View Full Code Here


    public static List<Route> getRouteList(RouteBuilder builder) throws Exception {
        CamelContext context = new DefaultCamelContext();
        context.addRoutes(builder);
        context.start();
        List<Route> answer = context.getRoutes();
        context.stop();
        return answer;
    }

    /**
     * Asserts that the text contains the given string
View Full Code Here

    public static List<Route> getRouteList(RouteBuilder builder) throws Exception {
        CamelContext context = new DefaultCamelContext();
        context.addRoutes(builder);
        context.start();
        List<Route> answer = context.getRoutes();
        context.stop();
        return answer;
    }

    /**
     * Asserts that the text contains the given string
View Full Code Here

    public static List<Route> getRouteList(RouteBuilder builder) throws Exception {
        CamelContext context = new DefaultCamelContext();
        context.addRoutes(builder);
        context.start();
        List<Route> answer = context.getRoutes();
        context.stop();
        return answer;
    }

    /**
     * Asserts that the text contains the given string
View Full Code Here

        assertEquals(ServiceStatus.Started.name(), state);
        id = (String) mbeanServer2.getAttribute(on, "CamelId");
        assertEquals("camel-2", id);

        camel1.stop();
        camel2.stop();
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
View Full Code Here

        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));

        context.removeComponent("log");

        context.stop();

        assertEquals(10, dummy1.getEvents().size());
        assertEquals(10, dummy2.getEvents().size());

        assertEquals("onContextStart", dummy1.getEvents().get(0));
View Full Code Here

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

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

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

        Thread.sleep(5 * 60 * 1000);
        context.stop();
        Thread.sleep(1000);
        broker.stop();

    }
    // END SNIPPET: starting
View Full Code Here

        } catch (Exception exception) {
            System.out.println("Get the exception " + exception.getCause());
        }
       
        Thread.sleep(1000);
        context.stop();
        System.exit(0);
    }

    public void configure() {
        errorHandler(noErrorHandler());
View Full Code Here

        }
    }
   
    protected void doStopInnerContext() throws Exception {
        CamelContext context = endpoint.getConfig().getInnerContext();
        context.stop();
        setStartedInnerContext(false);
    }

    protected void doStartInnerContext() throws Exception {
        // Add Route Builders and definitions to the inner camel context and start the context
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.