org.apache.activemq.artemis.jms.client

## Class ActiveMQMessageConsumer

- java.lang.Object
- - org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer

- All Implemented Interfaces:
    AutoCloseable, javax.jms.MessageConsumer, javax.jms.QueueReceiver, javax.jms.TopicSubscriber

      public final class ActiveMQMessageConsumer
      extends Object
      implements javax.jms.QueueReceiver, javax.jms.TopicSubscriber

  ActiveMQ Artemis implementation of a JMS MessageConsumer.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ActiveMQMessageConsumer(ConnectionFactoryOptions options, ActiveMQConnection connection, ActiveMQSession session, ClientConsumer consumer, boolean noLocal, ActiveMQDestination destination, String selector, SimpleString autoDeleteQueueName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `javax.jms.MessageListener` | `getMessageListener()`
    `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)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ActiveMQMessageConsumer

          protected ActiveMQMessageConsumer(ConnectionFactoryOptions options,
                                            ActiveMQConnection connection,
                                            ActiveMQSession session,
                                            ClientConsumer consumer,
                                            boolean noLocal,
                                            ActiveMQDestination destination,
                                            String selector,
                                            SimpleString autoDeleteQueueName)
                                     throws javax.jms.JMSException

      Throws:
        `javax.jms.JMSException`

  - ### Method Detail

    - #### getMessageSelector

          public String getMessageSelector()
                                    throws javax.jms.JMSException

      Specified by:
        `getMessageSelector` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### getMessageListener

          public javax.jms.MessageListener getMessageListener()
                                                       throws javax.jms.JMSException

      Specified by:
        `getMessageListener` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### setMessageListener

          public void setMessageListener(javax.jms.MessageListener listener)
                                  throws javax.jms.JMSException

      Specified by:
        `setMessageListener` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### receive

          public javax.jms.Message receive()
                                    throws javax.jms.JMSException

      Specified by:
        `receive` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### receive

          public javax.jms.Message receive(long timeout)
                                    throws javax.jms.JMSException

      Specified by:
        `receive` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### receiveNoWait

          public javax.jms.Message receiveNoWait()
                                          throws javax.jms.JMSException

      Specified by:
        `receiveNoWait` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### close

          public void close()
                     throws javax.jms.JMSException

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `javax.jms.MessageConsumer`
      Throws:
        `javax.jms.JMSException`

    - #### getQueue

          public javax.jms.Queue getQueue()
                                   throws javax.jms.JMSException

      Specified by:
        `getQueue` in interface `javax.jms.QueueReceiver`
      Throws:
        `javax.jms.JMSException`

    - #### getTopic

          public javax.jms.Topic getTopic()
                                   throws javax.jms.JMSException

      Specified by:
        `getTopic` in interface `javax.jms.TopicSubscriber`
      Throws:
        `javax.jms.JMSException`

    - #### getNoLocal

          public boolean getNoLocal()
                             throws javax.jms.JMSException

      Specified by:
        `getNoLocal` in interface `javax.jms.TopicSubscriber`
      Throws:
        `javax.jms.JMSException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### isClosed

          public boolean isClosed()

Copyright © 2017 The Apache Software Foundation. All rights reserved.