java.lang.Object | +----com.ibm.mq.jms.MQMessageConsumer
MQMessageConsumer is the parent interface for all message consumers. A client uses a message consumer to receive messages from a Destination .
public void close() throws JMSException;
Closes the message consumer. Because a provider can allocate some resources outside the Java Virtual Machine on behalf of a MessageConsumer , clients must close them when they are not needed. You cannot rely on garbage collection to reclaim these resources eventually because this might not occur soon enough. This call blocks until a receive() or active message listener has completed.
public Destination getDestination() throws JMSException;
Gets the message destination.
public MessageListener getMessageListener() throws JMSException;
Gets the message consumer's MessageListener.
public String getMessageSelector() throws JMSException;
Gets this message consumer's message selector expression.
public boolean getNoLocal() throws JMSException;
Indicates whether locally published messages are inhibited.
public Message receive() throws JMSException;
Receives the next message produced for this message consumer.
This call blocks indefinitely until a message is produced or until this message consumer is closed.
If this receive() is done within a transaction, the consumer retains the message until the transaction commits.
public Message receive(long timeout) throws JMSException;
Receives the next message that arrives within the specified timeout interval.
This call blocks until a message arrives, the timeout expires, or this message consumer is closed. A timeout of zero never expires, and the call blocks indefinitely.
public Message receiveNoWait() throws JMSException;
Receives the next message if one is immediately available.
public void setMessageListener(MessageListener listener) throws JMSException;
Sets the message consumer's MessageListener.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzaw1392 |