activemq-cpp-3.6.0
activemq::core::ActiveMQProducer Class Reference

#include <src/main/activemq/core/ActiveMQProducer.h>

Inheritance diagram for activemq::core::ActiveMQProducer:

Public Member Functions

 ActiveMQProducer (Pointer< activemq::core::kernels::ActiveMQProducerKernel > kernel)
 Constructor, creates an instance of an ActiveMQProducer to wrap the provided ActiveMQProducerKernel.
virtual ~ActiveMQProducer ()
virtual void close ()
 Closes this object and deallocates the appropriate resources.
virtual void send (cms::Message *message)
 Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (cms::Message *message, cms::AsyncCallback *callback)
 Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (cms::Message *message, int deliveryMode, int priority, long long timeToLive)
 Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (cms::Message *message, int deliveryMode, int priority, long long timeToLive, cms::AsyncCallback *callback)
 Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (const cms::Destination *destination, cms::Message *message)
 Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (const cms::Destination *destination, cms::Message *message, cms::AsyncCallback *callback)
 Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (const cms::Destination *destination, cms::Message *message, int deliveryMode, int priority, long long timeToLive)
 Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.
virtual void send (const cms::Destination *destination, cms::Message *message, int deliveryMode, int priority, long long timeToLive, cms::AsyncCallback *callback)
 Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.
virtual void setDeliveryMode (int mode)
 Sets the delivery mode for this Producer.
virtual int getDeliveryMode () const
 Gets the delivery mode for this Producer.
virtual void setDisableMessageID (bool value)
 Sets if Message Ids are disabled for this Producer.
virtual bool getDisableMessageID () const
 Gets if Message Ids are disabled for this Producer.
virtual void setDisableMessageTimeStamp (bool value)
 Sets if Message Time Stamps are disabled for this Producer.
virtual bool getDisableMessageTimeStamp () const
 Gets if Message Time Stamps are disabled for this Producer.
virtual void setPriority (int priority)
 Sets the Priority that this Producers sends messages at.
virtual int getPriority () const
 Gets the Priority level that this producer sends messages at.
virtual void setTimeToLive (long long time)
 Sets the Time to Live that this Producers sends messages with.
virtual long long getTimeToLive () const
 Gets the Time to Live that this producer sends messages with.
virtual void setSendTimeout (long long time)
 Sets the Send Timeout that this Producers sends messages with.
virtual long long getSendTimeout () const
 Gets the Send Timeout that this producer sends messages with.
virtual void setMessageTransformer (cms::MessageTransformer *transformer)
 Set an MessageTransformer instance that is applied to all cms::Message objects before they are sent on to the CMS bus.
virtual cms::MessageTransformergetMessageTransformer () const
 Gets the currently configured MessageTransformer for this MessageProducer.
bool isClosed () const
const Pointer
< commands::ProducerInfo > & 
getProducerInfo () const
 Retries this object ProducerInfo pointer.
const Pointer
< commands::ProducerId > & 
getProducerId () const
 Retries this object ProducerId or NULL if closed.
- Public Member Functions inherited from cms::MessageProducer
virtual ~MessageProducer ()
- Public Member Functions inherited from cms::Closeable
virtual ~Closeable ()

Constructor & Destructor Documentation

activemq::core::ActiveMQProducer::ActiveMQProducer ( Pointer< activemq::core::kernels::ActiveMQProducerKernel kernel)

Constructor, creates an instance of an ActiveMQProducer to wrap the provided ActiveMQProducerKernel.

Parameters
kernelThe Producer kernel pointer that implements the producers functionality.
virtual activemq::core::ActiveMQProducer::~ActiveMQProducer ( )
virtual

Member Function Documentation

virtual void activemq::core::ActiveMQProducer::close ( )
virtual

Closes this object and deallocates the appropriate resources.

The object is generally no longer usable after calling close.

Exceptions
CMSException- If an error occurs while the resource is being closed.

Implements cms::Closeable.

virtual int activemq::core::ActiveMQProducer::getDeliveryMode ( ) const
inlinevirtual

Gets the delivery mode for this Producer.

Returns
The DeliveryMode

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::getDeliveryMode().

virtual bool activemq::core::ActiveMQProducer::getDisableMessageID ( ) const
inlinevirtual

Gets if Message Ids are disabled for this Producer.

Returns
a boolean indicating state enable / disable (true / false) for MessageIds.

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::getDisableMessageID().

virtual bool activemq::core::ActiveMQProducer::getDisableMessageTimeStamp ( ) const
inlinevirtual

Gets if Message Time Stamps are disabled for this Producer.

Returns
boolean indicating state of enable / disable (true / false)

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::getDisableMessageTimeStamp().

virtual cms::MessageTransformer* activemq::core::ActiveMQProducer::getMessageTransformer ( ) const
inlinevirtual

Gets the currently configured MessageTransformer for this MessageProducer.

Returns
the pointer to the currently set cms::MessageTransformer.

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::getMessageTransformer().

virtual int activemq::core::ActiveMQProducer::getPriority ( ) const
inlinevirtual

Gets the Priority level that this producer sends messages at.

Returns
int based priority level

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::getPriority().

const Pointer<commands::ProducerId>& activemq::core::ActiveMQProducer::getProducerId ( ) const
inline

Retries this object ProducerId or NULL if closed.

Returns
ProducerId Reference

References activemq::core::kernels::ActiveMQProducerKernel::getProducerId().

const Pointer<commands::ProducerInfo>& activemq::core::ActiveMQProducer::getProducerInfo ( ) const
inline

Retries this object ProducerInfo pointer.

Returns
ProducerInfo Reference

References activemq::core::kernels::ActiveMQProducerKernel::getProducerInfo().

virtual long long activemq::core::ActiveMQProducer::getSendTimeout ( ) const
inlinevirtual

Gets the Send Timeout that this producer sends messages with.

Returns
The default send timeout value in milliseconds.

References activemq::core::kernels::ActiveMQProducerKernel::getSendTimeout().

virtual long long activemq::core::ActiveMQProducer::getTimeToLive ( ) const
inlinevirtual

Gets the Time to Live that this producer sends messages with.

Returns
The default time to live value in milliseconds.

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::getTimeToLive().

bool activemq::core::ActiveMQProducer::isClosed ( ) const
inline
Returns
true if this Producer has been closed.

References activemq::core::kernels::ActiveMQProducerKernel::isClosed().

virtual void activemq::core::ActiveMQProducer::send ( cms::Message message)
virtual

Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.

Uses default values for deliveryMode, priority, and time to live.

Parameters
messageThe message to be sent.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( cms::Message message,
cms::AsyncCallback onComplete 
)
virtual

Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.

Uses default values for deliveryMode, priority, and time to live. If the AsyncCallback parameter is set this method will return immediately and the call-back will be notified once the CMS Provider as acknowledge receipt of the Message or an Error occurs.

Parameters
messageThe message to be sent.
onCompleteThe AsyncCallback instance to notify on send complete or error, caller retains ownership of this pointer and must destroy it only after the send completes or the connection is closed.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( cms::Message message,
int  deliveryMode,
int  priority,
long long  timeToLive 
)
virtual

Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.

Parameters
messageThe message to be sent.
deliveryModeThe delivery mode to be used.
priorityThe priority for this message.
timeToLiveThe time to live value for this message in milliseconds.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( cms::Message message,
int  deliveryMode,
int  priority,
long long  timeToLive,
cms::AsyncCallback onComplete 
)
virtual

Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.

If the AsyncCallback parameter is set this method will return immediately and the call-back will be notified once the CMS Provider as acknowledge receipt of the Message or an Error occurs.

Parameters
messageThe message to be sent.
deliveryModeThe delivery mode to be used.
priorityThe priority for this message.
timeToLiveThe time to live value for this message in milliseconds.
onCompleteThe AsyncCallback instance to notify on send complete or error, caller retains ownership of this pointer and must destroy it only after the send completes or the connection is closed.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( const cms::Destination destination,
cms::Message message 
)
virtual

Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.

Uses default values for deliveryMode, priority, and time to live.

Parameters
destinationThe destination on which to send the message
messagethe message to be sent.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( const cms::Destination destination,
cms::Message message,
cms::AsyncCallback onComplete 
)
virtual

Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.

Uses default values for deliveryMode, priority, and time to live. If the AsyncCallback parameter is set this method will return immediately and the call-back will be notified once the CMS Provider as acknowledge receipt of the Message or an Error occurs.

Parameters
destinationThe destination on which to send the message
messagethe message to be sent.
onCompleteThe AsyncCallback instance to notify on send complete or error, caller retains ownership of this pointer and must destroy it only after the send completes or the connection is closed.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( const cms::Destination destination,
cms::Message message,
int  deliveryMode,
int  priority,
long long  timeToLive 
)
virtual

Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.

Parameters
destinationThe destination on which to send the message
messageThe message to be sent.
deliveryModeThe delivery mode to be used.
priorityThe priority for this message.
timeToLiveThe time to live value for this message in milliseconds.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::send ( const cms::Destination destination,
cms::Message message,
int  deliveryMode,
int  priority,
long long  timeToLive,
cms::AsyncCallback onComplete 
)
virtual

Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.

If the AsyncCallback parameter is set this method will return immediately and the call-back will be notified once the CMS Provider as acknowledge receipt of the Message or an Error occurs.

Parameters
destinationThe destination on which to send the message
messageThe message to be sent.
deliveryModeThe delivery mode to be used.
priorityThe priority for this message.
timeToLiveThe time to live value for this message in milliseconds.
onCompleteThe AsyncCallback instance to notify on send complete or error, caller retains ownership of this pointer and must destroy it only after the send completes or the connection is closed.
Exceptions
CMSException- if an internal error occurs while sending the message.
MessageFormatException- if an Invalid Message is given.
InvalidDestinationException- if a client uses this method with a MessageProducer with an invalid destination.
UnsupportedOperationException- if a client uses this method with a MessageProducer that did not specify a destination at creation time.

Implements cms::MessageProducer.

virtual void activemq::core::ActiveMQProducer::setDeliveryMode ( int  mode)
inlinevirtual

Sets the delivery mode for this Producer.

Parameters
mode- The DeliveryMode to use for Message sends.

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::setDeliveryMode().

virtual void activemq::core::ActiveMQProducer::setDisableMessageID ( bool  value)
inlinevirtual

Sets if Message Ids are disabled for this Producer.

Parameters
value- boolean indicating enable / disable (true / false)

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::setDisableMessageID().

virtual void activemq::core::ActiveMQProducer::setDisableMessageTimeStamp ( bool  value)
inlinevirtual

Sets if Message Time Stamps are disabled for this Producer.

Parameters
value- boolean indicating enable / disable (true / false)

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::setDisableMessageTimeStamp().

virtual void activemq::core::ActiveMQProducer::setMessageTransformer ( cms::MessageTransformer transformer)
inlinevirtual

Set an MessageTransformer instance that is applied to all cms::Message objects before they are sent on to the CMS bus.

The CMS code never takes ownership of the MessageTransformer pointer which implies that the client code must ensure that the object remains valid for the lifetime of the CMS object to which the MessageTransformer has been assigned.

Parameters
transformerPointer to the cms::MessageTransformer to apply on each cms:;MessageSend.

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::setMessageTransformer().

virtual void activemq::core::ActiveMQProducer::setPriority ( int  priority)
inlinevirtual

Sets the Priority that this Producers sends messages at.

Parameters
priorityint value for Priority level

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::setPriority().

virtual void activemq::core::ActiveMQProducer::setSendTimeout ( long long  time)
inlinevirtual

Sets the Send Timeout that this Producers sends messages with.

Parameters
timeThe new default send timeout value in milliseconds.

References activemq::core::kernels::ActiveMQProducerKernel::setSendTimeout().

virtual void activemq::core::ActiveMQProducer::setTimeToLive ( long long  time)
inlinevirtual

Sets the Time to Live that this Producers sends messages with.

Parameters
timeThe new default time to live value in milliseconds.

Implements cms::MessageProducer.

References activemq::core::kernels::ActiveMQProducerKernel::setTimeToLive().


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