org.apache.activemq
Interface MessageAvailableConsumer

All Superinterfaces:
MessageConsumer
All Known Implementing Classes:
ActiveMQMessageConsumer, ActiveMQQueueReceiver, ActiveMQTopicSubscriber

public interface MessageAvailableConsumer
extends 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
 MessageAvailableListener getAvailableListener()
          Gets the listener used to notify synchronous consumers that there is a message available so that the MessageConsumer.receiveNoWait() can be called.
 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.
 
Methods inherited from interface javax.jms.MessageConsumer
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
 

Method Detail

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.



Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.