Websphere MQ Everyplace

examples.midp.exampleapp.messageservice
Interface MessageConsumer

All Known Implementing Classes:
AppModel, MsgPumpModel

public interface MessageConsumer

This class is notified when a messsage has arrived on a monitored queue. This occurs by one of the 4 abstract procedures being called, depending on the type of message that has arrived.

A message service has a single message consumer.

Any class wishing to act as a server utilising the message service should implement this.


Field Summary
static short[] version
           
 
Method Summary
 void processDataGramMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
          A datagram message has been received.
 void processReplyMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
          A reply message has been received.
 void processRequestMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
          A new request message has been received.
 void processStatus(java.lang.String statusMessage)
          Display a status/error message.
 

Field Detail

version

public static final short[] version
Method Detail

processDataGramMsg

public void processDataGramMsg(MQeMsgObject message,
                               java.lang.String qMgrName,
                               java.lang.String qName)
A datagram message has been received.

Parameters:
message - The message to display
qMgrName - The queue manager the message is on
qName - The queue the message is on
Returns:
void

processReplyMsg

public void processReplyMsg(MQeMsgObject message,
                            java.lang.String qMgrName,
                            java.lang.String qName)
A reply message has been received.

Parameters:
message - The message to display
qMgrName - The queue manager the message is on
qName - The queue the message is on
Returns:
void

processRequestMsg

public void processRequestMsg(MQeMsgObject message,
                              java.lang.String qMgrName,
                              java.lang.String qName)
A new request message has been received. Note, the message still exists on the queue, it has been browsed so will stay on the queue until a get or delete operation.

Parameters:
message - The message to display.
qMgrName - The queue manager the message is on
qName - The queue the message is on
Returns:
void

processStatus

public void processStatus(java.lang.String statusMessage)
Display a status/error message. The implementaion of this method should display a status / error message in whatever form is appropriate for the application / device.

Parameters:
statusMessage - Status message to be displayed
Returns:
void

Websphere MQ Everyplace