com.ibm.workflow.sample.xml
Class SchufaSampleListener

java.lang.Object
  |
  +--com.ibm.workflow.sample.xml.SchufaSampleListener
All Implemented Interfaces:
com.ibm.workflow.upes.UPESListener

class SchufaSampleListener
extends java.lang.Object
implements com.ibm.workflow.upes.UPESListener

The SchufaSampleListener class is a sample implemenation of the UPESListener interface. It accepts InvokeProgram messages when the program name is 'AssessCreditRisk'. It simply returns an 'Y' in the 'AddApproval' field and an 'L' in the RiskFactor field of the return output container.


Field Summary
protected  java.util.Vector aChangeListener
           
private  javax.swing.DefaultListModel fieldLogListing
           
protected  java.beans.PropertyChangeSupport propertyChange
           
 
Constructor Summary
SchufaSampleListener()
          Constructor only makes an log entry indicating that the Listener has been started.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void AppendLogEntry(java.lang.String append)
          AppendLogEntry appends an entry to the objects log.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 javax.swing.DefaultListModel getLogListing()
           
 java.lang.String getName()
          getName returns the Name of the listener and is hardcoded.
protected  java.beans.PropertyChangeSupport getPropertyChange()
           
 boolean IsActive()
          IsActive always returns true because request are processed immediately.
 boolean IsResponsibleFor(com.ibm.workflow.upes.InvokeProgramData msg)
          IsResponsibleFor returns whether the listener is responsible for a given message It is responsible for message in which the program name is either 'RequestCreditApproval' or 'CreditApproval'.
 void ProcessMessage(com.ibm.workflow.upes.UPES u, com.ibm.workflow.upes.MQHandler MQH, com.ibm.workflow.upes.InvokeProgramData msg)
          ProcessMessage processes the handed over message.
 void register2UPES(com.ibm.workflow.upes.UPES u)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setLogListing(javax.swing.DefaultListModel logListing)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

aChangeListener

protected transient java.util.Vector aChangeListener

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange

fieldLogListing

private javax.swing.DefaultListModel fieldLogListing
Constructor Detail

SchufaSampleListener

public SchufaSampleListener()
Constructor only makes an log entry indicating that the Listener has been started.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

AppendLogEntry

public void AppendLogEntry(java.lang.String append)
AppendLogEntry appends an entry to the objects log.

firePropertyChange

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

getLogListing

public javax.swing.DefaultListModel getLogListing()

getName

public java.lang.String getName()
getName returns the Name of the listener and is hardcoded.
Specified by:
getName in interface com.ibm.workflow.upes.UPESListener
Returns:
returns "SchufaSampleListener" the Name of the listener and is hardcoded.

getPropertyChange

protected java.beans.PropertyChangeSupport getPropertyChange()

IsActive

public boolean IsActive()
IsActive always returns true because request are processed immediately.
Specified by:
IsActive in interface com.ibm.workflow.upes.UPESListener

IsResponsibleFor

public boolean IsResponsibleFor(com.ibm.workflow.upes.InvokeProgramData msg)
IsResponsibleFor returns whether the listener is responsible for a given message It is responsible for message in which the program name is either 'RequestCreditApproval' or 'CreditApproval'.
Specified by:
IsResponsibleFor in interface com.ibm.workflow.upes.UPESListener
Returns:
true, if the program name of msg is 'AssessCreditRisk'

false otherwise


ProcessMessage

public void ProcessMessage(com.ibm.workflow.upes.UPES u,
                           com.ibm.workflow.upes.MQHandler MQH,
                           com.ibm.workflow.upes.InvokeProgramData msg)
ProcessMessage processes the handed over message. This implementation is quite simple; it always returns the same response data. It simply returns an 'Y' in the 'AddApproval' field and an 'L' in the RiskFactor field of the return output container. The response is immediately sent back without further interaction.
Specified by:
ProcessMessage in interface com.ibm.workflow.upes.UPESListener
See Also:
UPES, InvokeProgramData

register2UPES

public void register2UPES(com.ibm.workflow.upes.UPES u)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

setLogListing

public void setLogListing(javax.swing.DefaultListModel logListing)