Package org.springframework.integration.samples.loanbroker

Examples of org.springframework.integration.samples.loanbroker.LoanBrokerGateway


    new LoanBrokerDemo().runDemo();
  }

  public void runDemo() {
    ApplicationContext context =  new ClassPathXmlApplicationContext("META-INF/spring/integration/bootstrap-config/stubbed-loan-broker.xml");
    LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class);
    LoanRequest loanRequest = new LoanRequest();
    loanRequest.setCustomer(new Customer());
    LoanQuote loan = broker.getBestLoanQuote(loanRequest);
    logger.info("********* Best Quote *********\n" + loan);
    System.out.println("==============================");
    List<LoanQuote> loanQuotes = broker.getAllLoanQuotes(loanRequest);
    logger.info("********* All Quotes *********");
    for (LoanQuote loanQuote : loanQuotes) {
      logger.info(loanQuote);
    }
  }
View Full Code Here


  private static Logger logger = Logger.getLogger(LoanBrokerSharkDetectorDemo.class);

  public static void main(String[] args) {
    ConfigurableApplicationContext context =
        new ClassPathXmlApplicationContext("META-INF/spring/integration/bootstrap-config/stubbed-loan-broker-multicast.xml");
    LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class);
    LoanRequest loanRequest = new LoanRequest();
    loanRequest.setCustomer(new Customer());
    LoanQuote loan = broker.getBestLoanQuote(loanRequest);
    logger.info("\n********* Best Quote: " + loan);
    List<LoanQuote> loanQuotes = broker.getAllLoanQuotes(loanRequest);
    logger.info("\n********* All Quotes: ");
    for (LoanQuote loanQuote : loanQuotes) {
      logger.info(loanQuote);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.integration.samples.loanbroker.LoanBrokerGateway

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.