activemq-cpp-3.6.0
activemq::util::ActiveMQMessageTransformation Class Reference

#include <src/main/activemq/util/ActiveMQMessageTransformation.h>

Public Member Functions

virtual ~ActiveMQMessageTransformation ()

Static Public Member Functions

static bool transformDestination (const cms::Destination *destination, const commands::ActiveMQDestination **amqDestination)
 Creates a fast shallow copy of the current ActiveMQDestination or creates a whole new destination instance from an available CMS destination from another provider.
static bool transformMessage (cms::Message *message, core::ActiveMQConnection *connection, commands::Message **amqMessage)
 Creates a fast shallow copy of the current ActiveMQMessage or creates a whole new message instance from an available CMS message from another provider.
static void copyProperties (const cms::Message *fromMessage, cms::Message *toMessage)
 Copies the standard CMS and user defined properties from the given message to the specified message.

Constructor & Destructor Documentation

virtual activemq::util::ActiveMQMessageTransformation::~ActiveMQMessageTransformation ( )
virtual

Member Function Documentation

static void activemq::util::ActiveMQMessageTransformation::copyProperties ( const cms::Message fromMessage,
cms::Message toMessage 
)
static

Copies the standard CMS and user defined properties from the given message to the specified message.

Parameters
fromMessageThe message to take the properties from.
toMessageThe message to add the properties to.
Exceptions
CMSExceptionif an error occurs during the copy.
static bool activemq::util::ActiveMQMessageTransformation::transformDestination ( const cms::Destination destination,
const commands::ActiveMQDestination **  amqDestination 
)
static

Creates a fast shallow copy of the current ActiveMQDestination or creates a whole new destination instance from an available CMS destination from another provider.

This method will return true if the passed CMS Destination was cloned and a new Destination object created or false if the input Destination was already an ActiveMQ destination. The should use the return value as a hint to determine if it needs to delete the amqDestinatio object or not.

Parameters
destinationDestination to be converted into ActiveMQ's implementation.
amqDestinationPointer to a pointer where the casted or cloned AMQ destination is stored.
Returns
true if the amqDestination is a new instance and not just a cast of the input destination.
Exceptions
CMSExceptionif an error occurs
static bool activemq::util::ActiveMQMessageTransformation::transformMessage ( cms::Message message,
core::ActiveMQConnection connection,
commands::Message **  amqMessage 
)
static

Creates a fast shallow copy of the current ActiveMQMessage or creates a whole new message instance from an available CMS message from another provider.

This method will return true if the passed CMS Message was cloned and a new ActiveMQMessage object created or false if the input Message was already an ActiveMQMessage instance. The caller should use the return value as a hint to determine if it needs to delete the resulting ActiveMQMessage object or not.

Parameters
messageCMS Message to be converted into ActiveMQ's implementation.
amqMessagePointer to a pointer where the casted or cloned AMQ message is stored.
Returns
true if the amqMessage is a new instance and not just a cast of the input message.
Exceptions
CMSExceptionif an error occurs

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