Class QueueReceiver

  • All Implemented Interfaces:
    jakarta.jms.MessageConsumer, jakarta.jms.QueueReceiver, AutoCloseable

    public class QueueReceiver
    extends MessageConsumer
    implements jakarta.jms.QueueReceiver
    Implements the jakarta.jms.QueueReceiver interface.
    • Constructor Detail

      • QueueReceiver

        QueueReceiver​(QueueSession sess,
                      Destination queue,
                      String selector)
               throws jakarta.jms.JMSException
        Constructs a receiver.
        Parameters:
        sess - The session the receiver belongs to.
        queue - The queue the receiver consumes on.
        selector - The selector for filtering messages.
        Throws:
        jakarta.jms.IllegalStateException - If the connection is broken.
        jakarta.jms.JMSException - If the creation fails for any other reason.
    • Method Detail

      • getQueue

        public jakarta.jms.Queue getQueue()
                                   throws jakarta.jms.JMSException
        API method. Gets the queue associated with this queue receiver.
        Specified by:
        getQueue in interface jakarta.jms.QueueReceiver
        Returns:
        this receiver's Queue.
        Throws:
        jakarta.jms.IllegalStateException - If the receiver is closed.
        jakarta.jms.JMSException