activemq-cpp-3.6.0
|
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. |
A MessageListener
object is used to receive asynchronously delivered messages.
|
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.
message | Message object {const} pointer recipient does not own. |