cms::MessageTransformer Class Reference

Provides an interface for clients to transform cms::Message objects inside the CMS MessageProducer and MessageConsumer objects before the message's are sent or received. More...

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

Public Member Functions

virtual ~MessageTransformer ()
virtual bool producerTransform (cms::Session *session, cms::MessageProducer *producer, cms::Message *message, cms::Message **transformed)=0
 Transforms the given message inside the producer before it is sent to the CMS bus.
virtual bool consumerTransform (cms::Session *session, cms::MessageConsumer *consumer, cms::Message *message, cms::Message **transformed)=0
 Transforms the given message inside the consumer before it is dispatched to the client code.

Detailed Description

Provides an interface for clients to transform cms::Message objects inside the CMS MessageProducer and MessageConsumer objects before the message's are sent or received.

Since:
3.0

Constructor & Destructor Documentation

virtual cms::MessageTransformer::~MessageTransformer (  )  [virtual]

Member Function Documentation

virtual bool cms::MessageTransformer::consumerTransform ( cms::Session session,
cms::MessageConsumer consumer,
cms::Message message,
cms::Message **  transformed 
) [pure virtual]

Transforms the given message inside the consumer before it is dispatched to the client code.

The contract of this method is that the resulting transformed message pointer is set if and only if the method actually creates a new cms::Message object, otherwise it must always be set to NULL. The return value indicates whether a transformation took place and indicates that the resulting transformed cms::Message pointer will need to be deleted once the consumer completed message dispatch.

Parameters:
session The Session used to create the target MessageConsumer for this transformation.
consumer The MessageConsumer instance that is going to handle dispatching the transformed Message.
message The CMS Message object that is to be transformed by this method.
transformed A pointer to the location in memory where the newly transformed Message has been allocated.
Returns:
true if the MessageConsumer should handle deleting the transformed Message once sent.
Exceptions:
cms::CMSException if an error occurs during the transform operation.
virtual bool cms::MessageTransformer::producerTransform ( cms::Session session,
cms::MessageProducer producer,
cms::Message message,
cms::Message **  transformed 
) [pure virtual]

Transforms the given message inside the producer before it is sent to the CMS bus.

The contract of this method is that the resulting transformed message pointer is set if and only if the method actually creates a new cms::Message object, otherwise it must always be set to NULL. The return value indicates whether a transformation took place and indicates that the resulting transformed cms::Message pointer will need to be deleted once the producer has sent the cms::Message on to the CMS bus.

Parameters:
session The Session used to create the target MessageProducer for this transformation.
producer The MessageProducer instance that is going to handle sending the transformed Message.
message The CMS Message object that is to be transformed by this method.
transformed A pointer to the location in memory where the newly transformed Message has been allocated.
Returns:
true if the MessageProducer should handle deleting the transformed Message once sent.
Exceptions:
cms::CMSException if an error occurs during the transform operation.

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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1