Websphere MQ Everyplace

com.ibm.mqe
Interface MQeMessageListenerInterface

All Known Implementing Classes:
AdminLogBrowser, AdminQueueBrowser, Example3, MQeMessageService, MQeServerApp

public interface MQeMessageListenerInterface

This interface must be implemented by all objects that wish to receive MQeMessage events.

All messages events will a single thread. This thread though is distinct from any application thread i.e. it is not the thread that triggered the event.

It is not recommened therefore that a lot of processing be done in the implementation of messageArrived.

Example:
 
 // Called when the message arrives on the queue.
 public void messageArrived(MQeMessageEvent e) {
     MQeFields msgFields;
 
     if (e.getQueueName().equals("MY.QUEUE"))
         msgFields = e.getMsgFields();     // get msg info
 
 }
 
 

Method Summary
 void messageArrived(MQeMessageEvent msgEvent)
          This method is called on all listening objects when an MQeMessageEvent.MessageArrived event is generated.
 

Method Detail

messageArrived

public void messageArrived(MQeMessageEvent msgEvent)
                    throws java.lang.Exception

This method is called on all listening objects when an MQeMessageEvent.MessageArrived event is generated.

Parameters:
msgEvent - An MQeMessageEvent object containing details of the newly arrived message.
Returns:
None
Throws:
None
java.lang.Exception

Websphere MQ Everyplace