activemq-cpp-3.6.0
|
A cached message producer contained within a pooled session. More...
#include <src/main/activemq/cmsutil/CachedProducer.h>
Public Member Functions | |
CachedProducer (cms::MessageProducer *producer) | |
virtual | ~CachedProducer () |
virtual void | close () |
Does nothing - the real producer resource will be closed by the lifecycle manager. | |
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 *onComplete) |
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 *onComplete) |
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 *onComplete) |
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 *onComplete) |
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 | 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::MessageTransformer * | getMessageTransformer () const |
Gets the currently configured MessageTransformer for this MessageProducer. | |
![]() | |
virtual | ~Closeable () |
A cached message producer contained within a pooled session.
activemq::cmsutil::CachedProducer::CachedProducer | ( | cms::MessageProducer * | producer | ) |
|
virtual |
|
inlinevirtual |
Does nothing - the real producer resource will be closed by the lifecycle manager.
Implements cms::Closeable.
|
inlinevirtual |
Gets the delivery mode for this Producer.
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::getDeliveryMode().
|
inlinevirtual |
Gets if Message Ids are disabled for this Producer.
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::getDisableMessageID().
|
inlinevirtual |
Gets if Message Time Stamps are disabled for this Producer.
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::getDisableMessageTimeStamp().
|
inlinevirtual |
Gets the currently configured MessageTransformer for this MessageProducer.
Implements cms::MessageProducer.
References cms::MessageProducer::getMessageTransformer().
|
inlinevirtual |
Gets the Priority level that this producer sends messages at.
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::getPriority().
|
inlinevirtual |
Gets the Time to Live that this producer sends messages with.
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::getTimeToLive().
|
inlinevirtual |
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.
message | The message to be sent. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
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.
message | The message to be sent. |
onComplete | The 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. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it.
message | The message to be sent. |
deliveryMode | The delivery mode to be used. |
priority | The priority for this message. |
timeToLive | The time to live value for this message in milliseconds. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
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.
message | The message to be sent. |
deliveryMode | The delivery mode to be used. |
priority | The priority for this message. |
timeToLive | The time to live value for this message in milliseconds. |
onComplete | The 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. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
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.
destination | The destination on which to send the message |
message | the message to be sent. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
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.
destination | The destination on which to send the message |
message | the message to be sent. |
onComplete | The 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. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it.
destination | The destination on which to send the message |
message | The message to be sent. |
deliveryMode | The delivery mode to be used. |
priority | The priority for this message. |
timeToLive | The time to live value for this message in milliseconds. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
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.
destination | The destination on which to send the message |
message | The message to be sent. |
deliveryMode | The delivery mode to be used. |
priority | The priority for this message. |
timeToLive | The time to live value for this message in milliseconds. |
onComplete | The 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. |
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.
References cms::MessageProducer::send().
|
inlinevirtual |
Sets the delivery mode for this Producer.
mode | The DeliveryMode |
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::setDeliveryMode().
|
inlinevirtual |
Sets if Message Ids are disabled for this Producer.
value | boolean indicating enable / disable (true / false) |
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::setDisableMessageID().
|
inlinevirtual |
Sets if Message Time Stamps are disabled for this Producer.
value | - boolean indicating enable / disable (true / false) |
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::setDisableMessageTimeStamp().
|
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.
transformer | Pointer to the cms::MessageTransformer to apply on each cms:;MessageSend. |
Implements cms::MessageProducer.
References cms::MessageProducer::setMessageTransformer().
|
inlinevirtual |
Sets the Priority that this Producers sends messages at.
priority | int value for Priority level |
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::setPriority().
|
inlinevirtual |
Sets the Time to Live that this Producers sends messages with.
This value will be used if the time to live is not specified via the send method.
time | default time to live value in milliseconds |
CMSException | - if an internal error occurs. |
Implements cms::MessageProducer.
References cms::MessageProducer::setTimeToLive().