Package org.apache.camel

Examples of org.apache.camel.Consumer.start()


            public void process(Exchange exchange) throws Exception {
                // noop
            }
        });

        consumer.start();
        consumer.stop();

        // the directory should now exists
        File dir = new File("target/file/foo");
        assertTrue("Directory should be created", dir.exists());
View Full Code Here


            public void process(Exchange exchange) throws Exception {
                // noop
            }
        });

        consumer.start();
        consumer.stop();

        // the directory should now exists
        File dir = new File(base);
        assertTrue("Directory should be created", dir.exists());
View Full Code Here

            public void process(Exchange exchange) throws Exception {
                // noop
            }
        });

        consumer.start();
        consumer.stop();

        // the directory should NOT exists
        File dir = new File("target/file/foo");
        assertFalse("Directory should NOT be created", dir.exists());
View Full Code Here

            public void process(Exchange exchange) throws Exception {
                // noop
            }
        });

        consumer.start();
        consumer.stop();

        // the directory should exist
        File dir = new File("target/file/foo.bar");
        assertTrue("Directory should be created", dir.exists());
View Full Code Here

            Consumer consumer = endpoint.createConsumer(new Processor() {
                public void process(Exchange exchange) throws Exception {
                    template.send("mock:result", exchange);
                }
            });
            consumer.start();

            assertMockEndpointsSatisfied();

            consumer.stop();
        } finally {
View Full Code Here

    @Test
    public void getAllContentFromServerOrderedFromRootToLeaves() throws Exception {
        resultEndpoint.expectedMessageCount(5);

        Consumer treeBasedConsumer = createConsumerFor(getUrl());
        treeBasedConsumer.start();

        resultEndpoint.assertIsSatisfied();
        treeBasedConsumer.stop();

        List<Exchange> exchanges = resultEndpoint.getExchanges();
View Full Code Here

    public void consumeDocumentsWithQuery() throws Exception {
        resultEndpoint.expectedMessageCount(2);

        Consumer queryBasedConsumer = createConsumerFor(
                getUrl() + "?query=SELECT * FROM cmis:document");
        queryBasedConsumer.start();
        resultEndpoint.assertIsSatisfied();
        queryBasedConsumer.stop();
    }

    private Consumer createConsumerFor(String path) throws Exception {
View Full Code Here

            }
        });
        // reset latch
        latch = new CountDownLatch(1);
        consumer.start();

        latch.await();
        consumer.stop();
    }
View Full Code Here

            Consumer consumer = endpoint.createConsumer(new Processor() {
                public void process(Exchange exchange) throws Exception {
                    template.send("mock:result", exchange);
                }
            });
            consumer.start();

            assertMockEndpointsSatisfied();

            consumer.stop();
        } finally {
View Full Code Here

                public void process(Exchange exchange) throws Exception {
                    Message message = createMessage(exchange);
                    getMessageListener().onMessage(message);
                }
            });
            answer.start();
            return answer;
        } catch (JMSException e) {
            throw e;
        } catch (Exception e) {
            throw JMSExceptionSupport.create(e);
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.