activemq-cpp-3.6.0
cms::MessageListener Class Reference

A MessageListener object is used to receive asynchronously delivered messages. More...

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

Public Member Functions

virtual ~MessageListener ()
virtual void onMessage (const Message *message)=0
 Called asynchronously when a new message is received, the message reference can be to any of the Message types.

Detailed Description

A MessageListener object is used to receive asynchronously delivered messages.

Since
1.0

Constructor & Destructor Documentation

virtual cms::MessageListener::~MessageListener ( )
virtual

Member Function Documentation

virtual void cms::MessageListener::onMessage ( const Message message)
pure virtual

Called asynchronously when a new message is received, the message reference can be to any of the Message types.

a dynamic cast is used to find out what type of message this is. The lifetime of this object is only guaranteed to be for life of the onMessage function after this call-back returns the message may no longer exists. Users should copy the data or clone the message if they wish to retain information that was contained in this Message.

It is considered a programming error for this method to throw an exception. The method has been tagged with the 'throw()' qualifier, this implies that you application will segfault if you throw an error from an implementation of this method.

Parameters
messageMessage object {const} pointer recipient does not own.

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