org.mule.samples.loanbroker
Class LoanConsumer

java.lang.Object
  extended byorg.mule.samples.loanbroker.LoanConsumer

public class LoanConsumer
extends Object

LoanConsumer is a loan broker client app that uses command line prompts to obtain loan requests


Constructor Summary
LoanConsumer()
           
LoanConsumer(String config)
           
 
Method Summary
 void close()
           
 LoanRequest createRequest()
           
protected static String getInteractiveConfig()
           
protected static LoanRequest getRequestFromUser()
           
static void main(String[] args)
           
protected static int readCharacter()
           
protected static int readInt()
           
protected static String readString()
           
 void request(LoanRequest request, boolean sync)
           
 void requestDispatch(int number, String endpoint)
           
 List requestSend(int number, String endpoint)
           
protected  void run(boolean synchronous)
           
protected  void sendRandomRequests(int number, boolean synchronous)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoanConsumer

public LoanConsumer()
             throws UMOException

LoanConsumer

public LoanConsumer(String config)
             throws UMOException
Method Detail

close

public void close()

createRequest

public LoanRequest createRequest()

request

public void request(LoanRequest request,
                    boolean sync)
             throws Exception
Throws:
Exception

requestDispatch

public void requestDispatch(int number,
                            String endpoint)
                     throws Exception
Throws:
Exception

requestSend

public List requestSend(int number,
                        String endpoint)
                 throws Exception
Throws:
Exception

main

public static void main(String[] args)

getInteractiveConfig

protected static String getInteractiveConfig()
                                      throws IOException
Throws:
IOException

run

protected void run(boolean synchronous)
            throws Exception
Throws:
Exception

sendRandomRequests

protected void sendRandomRequests(int number,
                                  boolean synchronous)
                           throws Exception
Throws:
Exception

readCharacter

protected static int readCharacter()
                            throws IOException
Throws:
IOException

readString

protected static String readString()
                            throws IOException
Throws:
IOException

readInt

protected static int readInt()
                      throws IOException
Throws:
IOException

getRequestFromUser

protected static LoanRequest getRequestFromUser()
                                         throws IOException
Throws:
IOException


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.