|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.workflow.sample.xml.CreditApprovalSampleListener
The CreditApprovalSampleListener class is a sample implemenation of the UPESListener interface. It accepts InvokeProgram messages when the program name is either 'RequestCreditApproval' or 'CreditApproval'. It then brings up an 'ApprovalView' with the given message information. While this listener is processing a message the _ready field is set to false. This means that IsActive() will return false in order to indicate that the listener is busy. This class supports a log to which entries are made each time somthing is processed.
Field Summary | |
protected java.util.Vector |
_aChangeListener
While the listener is processing a message _u contains the UPES from which the call came. |
private boolean |
_approve
|
private boolean |
_asyncWait
|
private javax.swing.DefaultListModel |
_fieldLogListing
_fieldLogListing contains the log entries which where generated during the livetime of the object. |
protected java.beans.PropertyChangeSupport |
_propertyChange
|
private boolean |
_ready
_ready is set to true if the listener is ready to receive and process messages. |
Constructor Summary | |
CreditApprovalSampleListener()
CreditApprovalSampleListener contructor of the listener. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
AppendLogEntry(java.lang.String append)
AppendLogEntry appends a log entry to the end of the log. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
boolean |
getApprove()
|
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 returns whether the listener is ready to receive and process incoming messages. |
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 upes,
com.ibm.workflow.upes.MQHandler MQH,
com.ibm.workflow.upes.InvokeProgramData msg)
ProcessMessage processes the handed over message. |
void |
ProcessResponse(com.ibm.workflow.upes.UPES upes,
com.ibm.workflow.upes.InvokeProgramData msg,
com.ibm.workflow.upes.MQHandler MQH)
ProcessResponse sends the response back to the UPES for a given message. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setApprove(boolean approve)
|
void |
setLogListing(javax.swing.DefaultListModel logListing)
|
void |
TerminateAsyncWait()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
protected transient java.util.Vector _aChangeListener
UPES
protected transient java.beans.PropertyChangeSupport _propertyChange
private javax.swing.DefaultListModel _fieldLogListing
AppendLogEntry(java.lang.String)
,
getLogListing()
,
setLogListing(javax.swing.DefaultListModel)
private boolean _ready
IsActive()
private boolean _asyncWait
private boolean _approve
Constructor Detail |
public CreditApprovalSampleListener()
Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void AppendLogEntry(java.lang.String append)
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
public javax.swing.DefaultListModel getLogListing()
public java.lang.String getName()
getName
in interface com.ibm.workflow.upes.UPESListener
protected java.beans.PropertyChangeSupport getPropertyChange()
public boolean IsActive()
IsActive
in interface com.ibm.workflow.upes.UPESListener
false, if the listener is not ready to receive and process incoming messages.
public boolean IsResponsibleFor(com.ibm.workflow.upes.InvokeProgramData msg)
IsResponsibleFor
in interface com.ibm.workflow.upes.UPESListener
false otherwise
public void ProcessMessage(com.ibm.workflow.upes.UPES upes, com.ibm.workflow.upes.MQHandler MQH, com.ibm.workflow.upes.InvokeProgramData msg)
ProcessMessage
in interface com.ibm.workflow.upes.UPESListener
UPES
,
InvokeProgramData
public void ProcessResponse(com.ibm.workflow.upes.UPES upes, com.ibm.workflow.upes.InvokeProgramData msg, com.ibm.workflow.upes.MQHandler MQH)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void setLogListing(javax.swing.DefaultListModel logListing)
public void TerminateAsyncWait()
public boolean getApprove()
public void setApprove(boolean approve)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |