Interface MessageAvailableConsumer

All Superinterfaces:
AutoCloseable, jakarta.jms.MessageConsumer
All Known Implementing Classes:
ActiveMQMessageConsumer, ActiveMQQueueReceiver, ActiveMQTopicSubscriber

public interface MessageAvailableConsumer extends jakarta.jms.MessageConsumer
An extended JMS interface that adds the ability to be notified when a message is available for consumption using the receive*() methods which is useful in Ajax style subscription models.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the listener used to notify synchronous consumers that there is a message available so that the MessageConsumer.receiveNoWait() can be called.
    void
    Sets the listener used to notify synchronous consumers that there is a message available so that the MessageConsumer.receiveNoWait() can be called.

    Methods inherited from interface jakarta.jms.MessageConsumer

    close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
  • Method Details

    • setAvailableListener

      void setAvailableListener(MessageAvailableListener availableListener)
      Sets the listener used to notify synchronous consumers that there is a message available so that the MessageConsumer.receiveNoWait() can be called.
    • getAvailableListener

      MessageAvailableListener getAvailableListener()
      Gets the listener used to notify synchronous consumers that there is a message available so that the MessageConsumer.receiveNoWait() can be called.