Package org.apache.camel.impl

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


        context.addRoutes(new LoanBroker());
        context.start();

        // Start the loan broker
        Thread.sleep(5 * 60 * 1000);
        context.stop();
        Thread.sleep(1000);
        bankServer.stop();
        creditAgencyServer.stop();
    }
    //END SNIPPET: server
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

                });
            }

            latch.await();

            context.stop();
        } catch (Exception ex) {
            fail("Get the exception " + ex + "here");
            // Make sure we the threads will exit, or the test will hung
            System.exit(-1);
        }
View Full Code Here

        System.out.println("Loan quote for Client " + ssn + "."
                           + " The lowest rate bank is " + bank + ", with rate " + rate);
       
        // Wait a while before stop the context
        Thread.sleep(1000 * 5);
        context.stop();
    }

    /**
     * Lets configure the Camel routing rules using Java code to pull the response message
     */
 
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

        context.addRoutes(new LoanBroker());
        context.start();

        // Start the loan broker
        Thread.sleep(5 * 60 * 1000);
        context.stop();
        Thread.sleep(1000);
        bankServer.stop();
        creditAgencyServer.stop();
    }
    //END SNIPPET: server
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

    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

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

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.