Package org.apache.camel.impl

Examples of org.apache.camel.impl.DefaultCamelContext.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


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

    @Override
    protected void setUp() throws Exception {
View Full Code Here

            throw new IllegalStateException("Did not receive execution reports");
        }
       
        LOG.info("Message received, shutting down Camel context");
       
        context.stop();
       
        LOG.info("Order execution example complete");
    }

    private NewOrderSingle createNewOrderMessage() {
View Full Code Here

        } catch (Exception ex) {
            assertTrue(ex.getMessage().endsWith(
                "Multiple consumers for the same endpoint is not allowed: Endpoint[cxf://http://localhost:7070/test?serviceClass=org.apache.camel.component.cxf.HelloService]"));
        }
               
        context.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();
    }

    protected RouteBuilder getRouteBuilder(final CamelContext context) {
        return new RouteBuilder() {
            // START SNIPPET: route
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

        ArrayList<HashMap<String, Object>> data = out.getOut().getBody(ArrayList.class);
        assertNotNull("out body could not be converted to an ArrayList - was: " + out.getOut().getBody(), data);
        assertEquals(2, data.size());
        // END SNIPPET: invoke

        camelContext.stop();
    }

    /**
     *
     */
 
View Full Code Here

            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
View Full Code Here

    protected 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

        try {
            context.start();
            fail("Expect an exception here");
        } catch (Exception ex) {
            assertTrue("Expect the exception message has a Soap errror", ex.getMessage().equals("Soap 1.1 endpoint already registered on address http://localhost:7070/test"));
            context.stop();
        }
       
       
    }
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.