Package org.apache.activemq
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 TypeMethodDescriptionGets the listener used to notify synchronous consumers that there is a message available so that theMessageConsumer.receiveNoWait()
can be called.void
setAvailableListener
(MessageAvailableListener availableListener) Sets the listener used to notify synchronous consumers that there is a message available so that theMessageConsumer.receiveNoWait()
can be called.Methods inherited from interface jakarta.jms.MessageConsumer
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
-
Method Details
-
setAvailableListener
Sets the listener used to notify synchronous consumers that there is a message available so that theMessageConsumer.receiveNoWait()
can be called. -
getAvailableListener
MessageAvailableListener getAvailableListener()Gets the listener used to notify synchronous consumers that there is a message available so that theMessageConsumer.receiveNoWait()
can be called.
-