activemq-cpp-3.6.0
|
This class implements in interface for browsing the messages in a Queue without removing them. More...
#include <src/main/cms/QueueBrowser.h>
Public Member Functions | |
virtual | ~QueueBrowser () |
virtual const Queue * | getQueue () const =0 |
virtual std::string | getMessageSelector () const =0 |
virtual cms::MessageEnumeration * | getEnumeration ()=0 |
Gets a pointer to an Enumeration object for browsing the Messages currently in the Queue in the order that a client would receive them. | |
![]() | |
virtual | ~Closeable () |
virtual void | close ()=0 |
Closes this object and deallocates the appropriate resources. |
This class implements in interface for browsing the messages in a Queue without removing them.
To browse the contents of the Queue the client calls the getEnumeration
method to retrieve a new instance of a Queue Enumerator. The client then calls the hasMoreMessages method of the Enumeration, if it returns true the client can safely call the nextMessage method of the Enumeration instance.
Enumeration* enumeration = queueBrowser->getEnumeration(); while( enumeration->hasMoreMessages() ) { cms::Message* message = enumeration->nextMessage(); // ... Do something with the Message. delete message; }
|
virtual |
|
pure virtual |
Gets a pointer to an Enumeration object for browsing the Messages currently in the Queue in the order that a client would receive them.
The pointer returned is owned by the browser and should not be deleted by the client application.
CMSException | if an internal error occurs. |
Implemented in activemq::core::ActiveMQQueueBrowser.
|
pure virtual |
CMSException | if an internal error occurs. |
Implemented in activemq::core::ActiveMQQueueBrowser.
CMSException | if an internal error occurs. |
Implemented in activemq::core::ActiveMQQueueBrowser.