Class ActiveMQMessageConsumer
- java.lang.Object
-
- org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,javax.jms.MessageConsumer
,javax.jms.QueueReceiver
,javax.jms.TopicSubscriber
public final class ActiveMQMessageConsumer extends java.lang.Object implements javax.jms.QueueReceiver, javax.jms.TopicSubscriber
ActiveMQ Artemis implementation of a JMS MessageConsumer.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ActiveMQMessageConsumer(ConnectionFactoryOptions options, ActiveMQConnection connection, ActiveMQSession session, ClientConsumer consumer, boolean noLocal, ActiveMQDestination destination, java.lang.String selector, org.apache.activemq.artemis.api.core.SimpleString autoDeleteQueueName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
javax.jms.MessageListener
getMessageListener()
java.lang.String
getMessageSelector()
boolean
getNoLocal()
javax.jms.Queue
getQueue()
javax.jms.Topic
getTopic()
boolean
isClosed()
javax.jms.Message
receive()
javax.jms.Message
receive(long timeout)
javax.jms.Message
receiveNoWait()
void
setMessageListener(javax.jms.MessageListener listener)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ActiveMQMessageConsumer
protected ActiveMQMessageConsumer(ConnectionFactoryOptions options, ActiveMQConnection connection, ActiveMQSession session, ClientConsumer consumer, boolean noLocal, ActiveMQDestination destination, java.lang.String selector, org.apache.activemq.artemis.api.core.SimpleString autoDeleteQueueName) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
-
Method Detail
-
getMessageSelector
public java.lang.String getMessageSelector() throws javax.jms.JMSException
- Specified by:
getMessageSelector
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
getMessageListener
public javax.jms.MessageListener getMessageListener() throws javax.jms.JMSException
- Specified by:
getMessageListener
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
setMessageListener
public void setMessageListener(javax.jms.MessageListener listener) throws javax.jms.JMSException
- Specified by:
setMessageListener
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
receive
public javax.jms.Message receive() throws javax.jms.JMSException
- Specified by:
receive
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
receive
public javax.jms.Message receive(long timeout) throws javax.jms.JMSException
- Specified by:
receive
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
receiveNoWait
public javax.jms.Message receiveNoWait() throws javax.jms.JMSException
- Specified by:
receiveNoWait
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
close
public void close() throws javax.jms.JMSException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-
getQueue
public javax.jms.Queue getQueue() throws javax.jms.JMSException
- Specified by:
getQueue
in interfacejavax.jms.QueueReceiver
- Throws:
javax.jms.JMSException
-
getTopic
public javax.jms.Topic getTopic() throws javax.jms.JMSException
- Specified by:
getTopic
in interfacejavax.jms.TopicSubscriber
- Throws:
javax.jms.JMSException
-
getNoLocal
public boolean getNoLocal() throws javax.jms.JMSException
- Specified by:
getNoLocal
in interfacejavax.jms.TopicSubscriber
- Throws:
javax.jms.JMSException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isClosed
public boolean isClosed()
-
-