public class MQMessageConsumer extends MQRoot implements javax.jms.MessageConsumer, JmsMessageConsumer
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the message consumer.
|
javax.jms.Destination |
getDestination()
Gets the message destination.
|
javax.jms.MessageListener |
getMessageListener()
Gets the message consumer's message listener.
|
java.lang.String |
getMessageSelector()
Gets this message consumer's message selector expression.
|
boolean |
getNoLocal()
Indicates whether locally published messages are inhibited.
|
javax.jms.Message |
receive()
Receives the next message produced for this message consumer.
|
javax.jms.Message |
receive(long timeout)
Receives the next message that arrives within the specified timeout interval.
|
javax.jms.Message |
receiveNoWait()
Receives the next message if one is immediately available.
|
void |
setMessageListener(javax.jms.MessageListener listener)
Sets the message consumer's message listener.
|
clear, containsKey, containsValue, entrySet, equals, get, getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, isEmpty, keySet, propertyExists, put, putAll, remove, setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, size, valuesgetClass, notify, notifyAll, toString, wait, wait, waitsetBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringPropertygetBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExistspublic void close()
throws javax.jms.JMSException
close in interface java.lang.AutoCloseableclose in interface javax.jms.MessageConsumerjavax.jms.JMSException - if the operation fails.public javax.jms.Destination getDestination()
throws javax.jms.JMSException
javax.jms.JMSException - if the operation fails.public javax.jms.MessageListener getMessageListener()
throws javax.jms.JMSException
getMessageListener in interface javax.jms.MessageConsumerjavax.jms.JMSException - if the operation fails.public java.lang.String getMessageSelector()
throws javax.jms.JMSException
getMessageSelector in interface javax.jms.MessageConsumerjavax.jms.JMSException - if the operation fails.public javax.jms.Message receive()
throws javax.jms.JMSException
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.
receive in interface javax.jms.MessageConsumerjavax.jms.JMSException - if the JMS provider fails to receive the next message due to an
internal error.public javax.jms.Message receive(long timeout)
throws javax.jms.JMSException
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.
receive in interface javax.jms.MessageConsumertimeout - the timeout value (milliseconds)javax.jms.JMSException - if the JMS provider fails to receive the next message due to an
internal error.public javax.jms.Message receiveNoWait()
throws javax.jms.JMSException
receiveNoWait in interface javax.jms.MessageConsumerjavax.jms.JMSException - if the JMS provider fails to receive the next message due to an
internal error.public void setMessageListener(javax.jms.MessageListener listener)
throws javax.jms.JMSException
setMessageListener in interface javax.jms.MessageConsumerlistener - the messages are delivered to this listener.javax.jms.JMSException - if the operation fails.MessageConsumer.setMessageListener(javax.jms.MessageListener)public boolean getNoLocal()
throws javax.jms.JMSException
getNoLocal in interface JmsMessageConsumerjavax.jms.JMSException