com.ibm.workflow.sample.xml
Class CreditRequest

java.lang.Object
  |
  +--com.ibm.workflow.sample.xml.CreditRequest

public class CreditRequest
extends java.lang.Object

The CreditRequest class represents a client application which can execute credit approval processes. It contains member fields describing the first, last name and address of the customer for who the credit approval is requested. Furthermore it contains the credit amount. With generateExecuteRequest an XML message is contructed in which the given information is put in. It is used by processCreditRequest to process a request. This class provides a log for logging certain steps of the processing. Especially for logging the outgoing and incoming messages. This application gets its input from the 'CreditRequestClient' queue which is managed by the same queue mangager as the XML input queue of the execution manager to which the request is sent to. (This is only for the ease of the example).


Field Summary
private  java.lang.String _Address
           
private  int _CreditAmount
           
private  java.lang.String _FirstName
           
private  java.lang.String _LastName
           
private  java.lang.String _Log
           
private  int _PID
           
private  java.lang.String _ReceiveFromQName
           
private  java.lang.Thread _t
           
private  java.lang.String fieldLog
           
protected  java.beans.PropertyChangeSupport propertyChange
           
 
Constructor Summary
CreditRequest()
          CreditRequest is the empty contructor of the class.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void appendLog(java.lang.String appendString)
          appendLog appends a log entry to the end of the log.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 java.lang.String getAddress()
           
 int getCreditAmount()
           
 java.lang.String getFirstName()
           
 java.lang.String getLastName()
           
 java.lang.String getLog()
           
 int getPID()
           
protected  java.beans.PropertyChangeSupport getPropertyChange()
           
static void main(java.lang.String[] args)
           
 void processCreditRequest()
          processCreditRequest is the method to process an execute process of MQSeries Workflow for the credit request process.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setAddress(java.lang.String new_Address)
           
 void setCreditAmount(int newCreditAmount)
           
 void setCreditAmount(java.lang.String amountAsString)
           
 void setFirstName(java.lang.String newName)
           
 void setLastName(java.lang.String new_lastName)
           
 void setLog(java.lang.String log)
           
 void setPID(int new_PID)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_FirstName

private java.lang.String _FirstName

_LastName

private java.lang.String _LastName

_Address

private java.lang.String _Address

_PID

private int _PID

_CreditAmount

private int _CreditAmount

_t

private java.lang.Thread _t

_Log

private java.lang.String _Log

_ReceiveFromQName

private java.lang.String _ReceiveFromQName

fieldLog

private java.lang.String fieldLog

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange
Constructor Detail

CreditRequest

public CreditRequest()
CreditRequest is the empty contructor of the class.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

appendLog

public void appendLog(java.lang.String appendString)
appendLog appends a log entry to the end of the log.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)

getAddress

public java.lang.String getAddress()

getCreditAmount

public int getCreditAmount()

getFirstName

public java.lang.String getFirstName()

getLastName

public java.lang.String getLastName()

getLog

public java.lang.String getLog()

getPID

public int getPID()

getPropertyChange

protected java.beans.PropertyChangeSupport getPropertyChange()

main

public static void main(java.lang.String[] args)

processCreditRequest

public void processCreditRequest()
processCreditRequest is the method to process an execute process of MQSeries Workflow for the credit request process. First the message is constructed by the generateExecuteRequest method. Then a connection to the queuing system is established and the message is sent. Afterwards it waits for a response with the WaitForResponse method which opens an own thread for it.
See Also:
WaitForResponse, generateExecuteRequest

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

setAddress

public void setAddress(java.lang.String new_Address)

setCreditAmount

public void setCreditAmount(int newCreditAmount)

setCreditAmount

public void setCreditAmount(java.lang.String amountAsString)

setFirstName

public void setFirstName(java.lang.String newName)

setLastName

public void setLastName(java.lang.String new_lastName)

setLog

public void setLog(java.lang.String log)

setPID

public void setPID(int new_PID)