activemq-cpp-3.6.0
cms::MessageEnumeration Class Reference

Defines an object that enumerates a collection of Messages. More...

#include <src/main/cms/MessageEnumeration.h>

Inheritance diagram for cms::MessageEnumeration:

Public Member Functions

virtual ~MessageEnumeration ()
virtual bool hasMoreMessages ()=0
 Returns true if there are more Message in the Browser that can be retrieved via the nextMessage method.
virtual cms::MessagenextMessage ()=0
 Returns the Next Message in the Queue if one is present, if no more Message's are available then an Exception is thrown.

Detailed Description

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.

Since
2.1

Constructor & Destructor Documentation

virtual cms::MessageEnumeration::~MessageEnumeration ( )
virtual

Member Function Documentation

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.

Returns
true if more Message's are available in the Browser.

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.

Returns
The next Message in the Queue.
Exceptions
CMSExceptionif no more Message's currently in the Queue.

Implemented in activemq::core::ActiveMQQueueBrowser.


The documentation for this class was generated from the following file: