activemq-cpp-3.4.0
|
A client uses a MessageProducer
object to send messages to a Destination.
More...
#include <src/main/cms/MessageProducer.h>
Public Member Functions | |
virtual | ~MessageProducer () throw () |
virtual void | send (Message *message)=0 |
Sends the message to the default producer destination, but does not take ownership of the message, caller must still destroy it. | |
virtual void | send (Message *message, int deliveryMode, int priority, long long timeToLive)=0 |
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 Destination *destination, Message *message)=0 |
Sends the message to the designated destination, but does not take ownership of the message, caller must still destroy it. | |
virtual void | send (const Destination *destination, Message *message, int deliveryMode, int priority, long long timeToLive)=0 |
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)=0 |
Sets the delivery mode for this Producer. | |
virtual int | getDeliveryMode () const =0 |
Gets the delivery mode for this Producer. | |
virtual void | setDisableMessageID (bool value)=0 |
Sets if Message Ids are disabled for this Producer. | |
virtual bool | getDisableMessageID () const =0 |
Gets if Message Ids are disabled for this Producer. | |
virtual void | setDisableMessageTimeStamp (bool value)=0 |
Sets if Message Time Stamps are disabled for this Producer. | |
virtual bool | getDisableMessageTimeStamp () const =0 |
Gets if Message Time Stamps are disabled for this Producer. | |
virtual void | setPriority (int priority)=0 |
Sets the Priority that this Producers sends messages at. | |
virtual int | getPriority () const =0 |
Gets the Priority level that this producer sends messages at. | |
virtual void | setTimeToLive (long long time)=0 |
Sets the Time to Live that this Producers sends messages with. | |
virtual long long | getTimeToLive () const =0 |
Gets the Time to Live that this producer sends messages with. |
A client uses a MessageProducer
object to send messages to a Destination.
A MessageProducer
object is created by passing a Destination
object to a message-producer creation method supplied by a session.
A client also has the option of creating a message producer without supplying a destination. In this case, a Destination must be provided with every send operation. A typical use for this kind of message producer is to send replies to requests using the request's CMSReplyTo destination.
A client can specify a default delivery mode, priority, and time to live for messages sent by a message producer. It can also specify the delivery mode, priority, and time to live for an individual message.
A client can specify a time-to-live value in milliseconds for each message it sends. This value defines a message expiration time that is the sum of the message's time-to-live and the GMT when it is sent (for transacted sends, this is the time the client sends the message, not the time the transaction is committed).
virtual cms::MessageProducer::~MessageProducer | ( | ) | throw () [virtual] |
virtual int cms::MessageProducer::getDeliveryMode | ( | ) | const [pure virtual] |
Gets the delivery mode for this Producer.
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual bool cms::MessageProducer::getDisableMessageID | ( | ) | const [pure virtual] |
Gets if Message Ids are disabled for this Producer.
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual bool cms::MessageProducer::getDisableMessageTimeStamp | ( | ) | const [pure virtual] |
Gets if Message Time Stamps are disabled for this Producer.
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual int cms::MessageProducer::getPriority | ( | ) | const [pure virtual] |
Gets the Priority level that this producer sends messages at.
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual long long cms::MessageProducer::getTimeToLive | ( | ) | const [pure virtual] |
Gets the Time to Live that this producer sends messages with.
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::send | ( | Message * | message, |
int | deliveryMode, | ||
int | priority, | ||
long long | timeToLive | ||
) | [pure virtual] |
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. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::send | ( | const Destination * | destination, |
Message * | message, | ||
int | deliveryMode, | ||
int | priority, | ||
long long | timeToLive | ||
) | [pure virtual] |
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. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::send | ( | Message * | message | ) | [pure 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.
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. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::send | ( | const Destination * | destination, |
Message * | message | ||
) | [pure 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.
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. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::setDeliveryMode | ( | int | mode | ) | [pure virtual] |
Sets the delivery mode for this Producer.
mode | The DeliveryMode |
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::setDisableMessageID | ( | bool | value | ) | [pure virtual] |
Sets if Message Ids are disabled for this Producer.
value | boolean indicating enable / disable (true / false) |
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::setDisableMessageTimeStamp | ( | bool | value | ) | [pure virtual] |
Sets if Message Time Stamps are disabled for this Producer.
value | - boolean indicating enable / disable (true / false) |
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::setPriority | ( | int | priority | ) | [pure virtual] |
Sets the Priority that this Producers sends messages at.
priority | int value for Priority level |
CMSException | - if an internal error occurs. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.
virtual void cms::MessageProducer::setTimeToLive | ( | long long | time | ) | [pure virtual] |
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. |
Implemented in activemq::cmsutil::CachedProducer, and activemq::core::ActiveMQProducer.