activemq-cpp-3.4.0
|
Defines an object that enumerates a collection of Messages. More...
#include <src/main/cms/MessageEnumeration.h>
Public Member Functions | |
virtual | ~MessageEnumeration () throw () |
virtual bool | hasMoreMessages ()=0 |
Returns true if there are more Message in the Browser that can be retrieved via the nextMessage method. | |
virtual cms::Message * | nextMessage ()=0 |
Returns the Next Message in the Queue if one is present, if no more Message's are available then an Exception is thrown. |
Defines an object that enumerates a collection of Messages.
The client calls the hasMoreMessages method to determine if a Message is available. If a Message is available the client calls the nextMessage method to retrieve that Message, calling nextMessage when a Message is not available results in an exception.
virtual cms::MessageEnumeration::~MessageEnumeration | ( | ) | throw () [virtual] |
virtual bool cms::MessageEnumeration::hasMoreMessages | ( | ) | [pure virtual] |
Returns true if there are more Message in the Browser that can be retrieved via the nextMessage
method.
If this method returns false and the nextMessage
method is called then an Exception will be thrown.
Implemented in activemq::core::ActiveMQQueueBrowser.
virtual cms::Message* cms::MessageEnumeration::nextMessage | ( | ) | [pure virtual] |
Returns the Next Message in the Queue if one is present, if no more Message's are available then an Exception is thrown.
If a Message object pointer is returned then that object becomes the property of the caller and must be deleted by the caller when finished.
CMSException | if no more Message's currently in the Queue. |
Implemented in activemq::core::ActiveMQQueueBrowser.