KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > samples > loanbroker > esb > LoanBroker


1 /*
2  * $Id: LoanBroker.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.samples.loanbroker.esb;
12
13 import org.mule.samples.loanbroker.esb.message.CustomerQuoteRequest;
14 import org.mule.samples.loanbroker.esb.message.LoanQuoteRequest;
15
16 /**
17  * <code>LoanBroker</code> is the Service that starts the loan request process. The
18  * broker also receives the final quote.
19  *
20  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
21  * @version $Revision: 3798 $
22  */

23 public class LoanBroker
24 {
25     /**
26      * Triggers the Loan Broker process. The LoanQuoteRequest returned is sent on the
27      * bus. Because the LoanBroker component has a ResponseRouter configured on it it
28      * will not return to the callee until the responseRouter and processed. In this
29      * case it waits until all loan requests to the banks have been returned and then
30      * returns the lowest LoanQuote to the callee.
31      *
32      * @param request
33      * @return
34      * @throws Exception
35      */

36     public LoanQuoteRequest requestLoanQuote(CustomerQuoteRequest request) throws Exception JavaDoc
37     {
38         LoanQuoteRequest bqr = new LoanQuoteRequest();
39         bqr.setCustomerRequest(request);
40         return bqr;
41     }
42 }
43
Popular Tags