Websphere MQ Everyplace

com.ibm.mqe.jms
Class MQeMessageConsumer

java.lang.Object
  |
  +--com.ibm.mqe.jms.MQeMessageConsumer
All Implemented Interfaces:
javax.jms.MessageConsumer
Direct Known Subclasses:
MQeQueueReceiver

public class MQeMessageConsumer
extends java.lang.Object
implements javax.jms.MessageConsumer

A client uses a message consumer to receive messages from a Destination.

A message consumer can be created with a message selector. This allows the client to restrict the messages delivered to the message consumer to those that match the selector.

A client can request the next message from a message consumer using one of its receive methods. There are several variations of receive that allow a client to poll or wait for the next message.

See Also:
QueueReceiver

Constructor Summary
MQeMessageConsumer()
           
 
Method Summary
 void close()
          Since a provider may allocate some resources on behalf of a MessageConsumer outside the JVM, clients should close them when they are not needed.
 java.lang.String getMessageSelector()
          Get this message consumer's message selector expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.MessageConsumer
getMessageListener, receive, receive, receiveNoWait, setMessageListener
 

Constructor Detail

MQeMessageConsumer

public MQeMessageConsumer()
Method Detail

getMessageSelector

public java.lang.String getMessageSelector()
                                    throws javax.jms.JMSException
Get this message consumer's message selector expression.

Specified by:
getMessageSelector in interface javax.jms.MessageConsumer
Returns:
this message consumer's message selector
Throws:
javax.jms.JMSException - if JMS fails to get message selector due to some JMS error

close

public void close()
           throws javax.jms.JMSException
Since a provider may allocate some resources on behalf of a MessageConsumer outside the JVM, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

Specified by:
close in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException - if JMS fails to close the consumer due to some error.

Websphere MQ Everyplace