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);
}
}