activemq-cpp-3.4.0

activemq::cmsutil::CachedProducer Class Reference

A cached message producer contained within a pooled session. More...

#include <src/main/activemq/cmsutil/CachedProducer.h>

Inheritance diagram for activemq::cmsutil::CachedProducer:

Public Member Functions

 CachedProducer (cms::MessageProducer *producer)
virtual ~CachedProducer () throw ()
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, 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 (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, 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 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.

Detailed Description

A cached message producer contained within a pooled session.


Constructor & Destructor Documentation

activemq::cmsutil::CachedProducer::CachedProducer ( cms::MessageProducer producer) [inline]
virtual activemq::cmsutil::CachedProducer::~CachedProducer ( ) throw () [inline, virtual]

Member Function Documentation

virtual void activemq::cmsutil::CachedProducer::close ( ) [inline, virtual]

Does nothing - the real producer resource will be closed by the lifecycle manager.

Implements cms::Closeable.

virtual int activemq::cmsutil::CachedProducer::getDeliveryMode ( ) const [inline, virtual]

Gets the delivery mode for this Producer.

Returns:
The DeliveryMode
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual bool activemq::cmsutil::CachedProducer::getDisableMessageID ( ) const [inline, virtual]

Gets if Message Ids are disabled for this Producer.

Returns:
boolean indicating enable / disable (true / false)
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual bool activemq::cmsutil::CachedProducer::getDisableMessageTimeStamp ( ) const [inline, virtual]

Gets if Message Time Stamps are disabled for this Producer.

Returns:
boolean indicating enable / disable (true / false)
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual int activemq::cmsutil::CachedProducer::getPriority ( ) const [inline, virtual]

Gets the Priority level that this producer sends messages at.

Returns:
int based priority level
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual long long activemq::cmsutil::CachedProducer::getTimeToLive ( ) const [inline, virtual]

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

Returns:
Time to live value in milliseconds
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual void activemq::cmsutil::CachedProducer::send ( cms::Message message) [inline, 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::cmsutil::CachedProducer::send ( const cms::Destination destination,
cms::Message message 
) [inline, 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::cmsutil::CachedProducer::send ( const cms::Destination destination,
cms::Message message,
int  deliveryMode,
int  priority,
long long  timeToLive 
) [inline, 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::cmsutil::CachedProducer::send ( cms::Message message,
int  deliveryMode,
int  priority,
long long  timeToLive 
) [inline, 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::cmsutil::CachedProducer::setDeliveryMode ( int  mode) [inline, virtual]

Sets the delivery mode for this Producer.

Parameters:
modeThe DeliveryMode
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual void activemq::cmsutil::CachedProducer::setDisableMessageID ( bool  value) [inline, virtual]

Sets if Message Ids are disabled for this Producer.

Parameters:
valueboolean indicating enable / disable (true / false)
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual void activemq::cmsutil::CachedProducer::setDisableMessageTimeStamp ( bool  value) [inline, virtual]

Sets if Message Time Stamps are disabled for this Producer.

Parameters:
value- boolean indicating enable / disable (true / false)
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual void activemq::cmsutil::CachedProducer::setPriority ( int  priority) [inline, virtual]

Sets the Priority that this Producers sends messages at.

Parameters:
priorityint value for Priority level
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.

virtual void activemq::cmsutil::CachedProducer::setTimeToLive ( long long  time) [inline, 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.

Parameters:
timedefault time to live value in milliseconds
Exceptions:
CMSException- if an internal error occurs.

Implements cms::MessageProducer.


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