Package org.apache.camel

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


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

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

        List<Exchange> exchanges = resultEndpoint.getExchanges();
        assertTrue(getNodeNameForIndex(exchanges, 0).equals("RootFolder"));
        assertTrue(getNodeNameForIndex(exchanges, 1).equals("Folder1"));
        assertTrue(getNodeNameForIndex(exchanges, 2).equals("Folder2"));
View Full Code Here


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

    private Consumer createConsumerFor(String path) throws Exception {
        Endpoint endpoint = context.getEndpoint("cmis://" + path);
        return endpoint.createConsumer(new Processor() {
View Full Code Here

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

        latch.await();
        consumer.stop();
    }

    private class SendLateReply implements Runnable {

        public void run() {
View Full Code Here

                // noop
            }
        });

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

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

                // noop
            }
        });

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

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

                // noop
            }
        });

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

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

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

        latch.await();
        consumer.stop();
    }

    private class SendLateReply implements Runnable {

        public void run() {
View Full Code Here

            });
            consumer.start();

            assertMockEndpointsSatisfied();

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

            }
        });
        consumer.start();
        latch.await();

        consumer.stop();
    }

}
View Full Code Here

                // noop
            }
        });

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

        // the directory should now exists
        File dir = new File("target/file/foo").getAbsoluteFile();
        assertTrue("Directory should be created", dir.exists());
        assertTrue("Directory should be a directory", dir.isDirectory());
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.