Package org.apache.camel.component.routebox.demo

Examples of org.apache.camel.component.routebox.demo.Book


       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Beginning Test ---> testRouteboxSedaAsyncRequests()");
        }       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");

        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        // Wait for 2 seconds before a follow-on request if the requests are sent in async mode
        // to allow the earlier request to take effect
        //Thread.sleep(2000);
       
        book = (Book) sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received book with author " + book.getAuthor() + " and title " + book.getTitle());
        }       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Completed Test ---> testRouteboxSedaAsyncRequests()");
        }
        context.stop();
View Full Code Here


       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Beginning Test ---> testRouteboxDirectSyncRequests()");
        }       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");
       
        String response = sendAddToCatalogRequest(template, "direct:start", "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);

        //Thread.sleep(2000);
       
        book = (Book) sendFindBookRequest(template, "direct:start", "findBook", "Sir Arthur Conan Doyle");
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received book with author " + book.getAuthor() + " and title " + book.getTitle());
        }       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Completed Test ---> testRouteboxDirectSyncRequests()");
        }
        context.stop();
View Full Code Here

       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Beginning Test ---> testRouteboxDirectAsyncRequests()");
        }       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");
       
        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        // Wait for 2 seconds before a follow-on request if the requests are sent in async mode
        // to allow the earlier request to take effect
        //Thread.sleep(2000);
       
        book = (Book) sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received book with author " + book.getAuthor() + " and title " + book.getTitle());
        }       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Completed Test ---> testRouteboxDirectAsyncRequests()");
        }
        context.stop();
View Full Code Here

       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Beginning Test ---> testRouteboxUsingDefaultContextAndRouteBuilder()");
        }       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");

        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        book = (Book) sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received book with author " + book.getAuthor() + " and title " + book.getTitle());
        }       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Completed Test ---> testRouteboxUsingDefaultContextAndRouteBuilder()");
        }
        context.stop();
View Full Code Here

       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Beginning Test ---> testRouteboxUsingDispatchMap()");
        }       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");

        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        book = (Book) sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received book with author " + book.getAuthor() + " and title " + book.getTitle());
        }       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        if (LOG.isDebugEnabled()) {
            LOG.debug("Completed Test ---> testRouteboxUsingDispatchMap()");
        }
        context.stop();
View Full Code Here

        });
        context.start();
       
        LOG.debug("Beginning Test ---> testRouteboxSedaAsyncRequests()");
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");

        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        // Wait for 2 seconds before a follow-on request if the requests are sent in async mode
        // to allow the earlier request to take effect
        //Thread.sleep(2000);
       
        book = sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        LOG.debug("Received book with author {} and title {}", book.getAuthor(), book.getTitle());      
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        LOG.debug("Completed Test ---> testRouteboxSedaAsyncRequests()");
        context.stop();
    }   
View Full Code Here

        });
        context.start();
       
        LOG.debug("Beginning Test ---> testRouteboxDirectSyncRequests()");      
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");
       
        String response = sendAddToCatalogRequest(template, "direct:start", "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);

        //Thread.sleep(2000);
       
        book = sendFindBookRequest(template, "direct:start", "findBook", "Sir Arthur Conan Doyle");
        LOG.debug("Received book with author {} and title {}", book.getAuthor(), book.getTitle());       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        LOG.debug("Completed Test ---> testRouteboxDirectSyncRequests()");
        context.stop();
    }     
View Full Code Here

        });
        context.start();
       
        LOG.debug("Beginning Test ---> testRouteboxDirectAsyncRequests()");
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");
       
        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        // Wait for 2 seconds before a follow-on request if the requests are sent in async mode
        // to allow the earlier request to take effect
        //Thread.sleep(2000);
       
        book = sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        LOG.debug("Received book with author {} and title {}", book.getAuthor(), book.getTitle());       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        LOG.debug("Completed Test ---> testRouteboxDirectAsyncRequests()");
        context.stop();
    }   
View Full Code Here

        });
        context.start();
       
        LOG.debug("Beginning Test ---> testRouteboxUsingDefaultContextAndRouteBuilder()");       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");

        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        book = sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        LOG.debug("Received book with author {} and title {}", book.getAuthor(), book.getTitle());       
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        LOG.debug("Completed Test ---> testRouteboxUsingDefaultContextAndRouteBuilder()");
        context.stop();
   
View Full Code Here

        });
        context.start();
       
        LOG.debug("Beginning Test ---> testRouteboxUsingDispatchMap()");       
       
        Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");

        String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
        assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
       
        book = sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
        LOG.debug("Received book with author {} and title {}", book.getAuthor(), book.getTitle());      
        assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
       
        LOG.debug("Completed Test ---> testRouteboxUsingDispatchMap()");
        context.stop();
   
View Full Code Here

TOP

Related Classes of org.apache.camel.component.routebox.demo.Book

Copyright © 2018 www.massapicom. 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.