activemq::core::kernels::ActiveMQProducerKernel Class Reference

#include <src/main/activemq/core/kernels/ActiveMQProducerKernel.h>

Inheritance diagram for activemq::core::kernels::ActiveMQProducerKernel:
Inheritance graph
[legend]

Public Member Functions

 ActiveMQProducerKernel (ActiveMQSessionKernel *session, const Pointer< commands::ProducerId > &producerId, const Pointer< commands::ActiveMQDestination > &destination, long long sendTimeout)
 Constructor, creates an instance of an ActiveMQProducerKernel.
virtual ~ActiveMQProducerKernel ()
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 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.
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.
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.
virtual void onProducerAck (const commands::ProducerAck &ack)
 Handles the work of Processing a ProducerAck Command from the Broker.
void dispose ()
 Performs Producer object cleanup but doesn't attempt to send the Remove command to the broker.
long long getNextMessageSequence ()

Constructor & Destructor Documentation

activemq::core::kernels::ActiveMQProducerKernel::ActiveMQProducerKernel ( ActiveMQSessionKernel session,
const Pointer< commands::ProducerId > &  producerId,
const Pointer< commands::ActiveMQDestination > &  destination,
long long  sendTimeout 
)

Constructor, creates an instance of an ActiveMQProducerKernel.

Parameters:
session The Session which is the parent of this Producer.
parent Pointer to the cms::MessageProducer that will wrap this kernel object.
producerId Pointer to a ProducerId object which identifies this producer.
destination The assigned Destination this Producer sends to, or null if not set. The Producer does not own the Pointer passed.
sendTimeout The configured send timeout for this Producer.
virtual activemq::core::kernels::ActiveMQProducerKernel::~ActiveMQProducerKernel (  )  [virtual]

Member Function Documentation

virtual void activemq::core::kernels::ActiveMQProducerKernel::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.

void activemq::core::kernels::ActiveMQProducerKernel::dispose (  ) 

Performs Producer object cleanup but doesn't attempt to send the Remove command to the broker.

Called when the parent resource if closed first to avoid the message send and avoid any exceptions that might be thrown from an attempt to send a remove command to a failed transport.

virtual int activemq::core::kernels::ActiveMQProducerKernel::getDeliveryMode (  )  const [inline, virtual]

Gets the delivery mode for this Producer.

Returns:
The DeliveryMode

Implements cms::MessageProducer.

virtual bool activemq::core::kernels::ActiveMQProducerKernel::getDisableMessageID (  )  const [inline, virtual]

Gets if Message Ids are disabled for this Producer.

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

Implements cms::MessageProducer.

virtual bool activemq::core::kernels::ActiveMQProducerKernel::getDisableMessageTimeStamp (  )  const [inline, virtual]

Gets if Message Time Stamps are disabled for this Producer.

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

Implements cms::MessageProducer.

virtual cms::MessageTransformer* activemq::core::kernels::ActiveMQProducerKernel::getMessageTransformer (  )  const [inline, virtual]

Gets the currently configured MessageTransformer for this MessageProducer.

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

Implements cms::MessageProducer.

long long activemq::core::kernels::ActiveMQProducerKernel::getNextMessageSequence (  )  [inline]
Returns:
the next sequence number for a Message sent from this Producer.
virtual int activemq::core::kernels::ActiveMQProducerKernel::getPriority (  )  const [inline, virtual]

Gets the Priority level that this producer sends messages at.

Returns:
int based priority level

Implements cms::MessageProducer.

const Pointer<commands::ProducerId>& activemq::core::kernels::ActiveMQProducerKernel::getProducerId (  )  const [inline]

Retries this object ProducerId or NULL if closed.

Returns:
ProducerId Reference
const Pointer<commands::ProducerInfo>& activemq::core::kernels::ActiveMQProducerKernel::getProducerInfo (  )  const [inline]

Retries this object ProducerInfo pointer.

Returns:
ProducerInfo Reference
virtual long long activemq::core::kernels::ActiveMQProducerKernel::getSendTimeout (  )  const [inline, virtual]

Gets the Send Timeout that this producer sends messages with.

Returns:
The default send timeout value in milliseconds.
virtual long long activemq::core::kernels::ActiveMQProducerKernel::getTimeToLive (  )  const [inline, virtual]

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

Returns:
The default time to live value in milliseconds.

Implements cms::MessageProducer.

bool activemq::core::kernels::ActiveMQProducerKernel::isClosed (  )  const [inline]
Returns:
true if this Producer has been closed.
virtual void activemq::core::kernels::ActiveMQProducerKernel::onProducerAck ( const commands::ProducerAck ack  )  [virtual]

Handles the work of Processing a ProducerAck Command from the Broker.

Parameters:
ack - The ProducerAck message received from the Broker.
virtual void activemq::core::kernels::ActiveMQProducerKernel::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:
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.
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::kernels::ActiveMQProducerKernel::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:
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.
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::kernels::ActiveMQProducerKernel::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:
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.
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::kernels::ActiveMQProducerKernel::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:
destination The destination on which to send the message
message the 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::kernels::ActiveMQProducerKernel::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:
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.
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::kernels::ActiveMQProducerKernel::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:
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.
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::kernels::ActiveMQProducerKernel::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:
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.
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::kernels::ActiveMQProducerKernel::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:
message The 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::kernels::ActiveMQProducerKernel::setDeliveryMode ( int  mode  )  [inline, virtual]

Sets the delivery mode for this Producer.

Parameters:
mode - The DeliveryMode to use for Message sends.

Implements cms::MessageProducer.

virtual void activemq::core::kernels::ActiveMQProducerKernel::setDisableMessageID ( bool  value  )  [inline, virtual]

Sets if Message Ids are disabled for this Producer.

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

Implements cms::MessageProducer.

virtual void activemq::core::kernels::ActiveMQProducerKernel::setDisableMessageTimeStamp ( bool  value  )  [inline, virtual]

Sets if Message Time Stamps are disabled for this Producer.

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

Implements cms::MessageProducer.

virtual void activemq::core::kernels::ActiveMQProducerKernel::setMessageTransformer ( cms::MessageTransformer transformer  )  [inline, virtual]

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

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

Implements cms::MessageProducer.

virtual void activemq::core::kernels::ActiveMQProducerKernel::setPriority ( int  priority  )  [inline, virtual]

Sets the Priority that this Producers sends messages at.

Parameters:
priority int value for Priority level

Implements cms::MessageProducer.

virtual void activemq::core::kernels::ActiveMQProducerKernel::setSendTimeout ( long long  time  )  [inline, virtual]

Sets the Send Timeout that this Producers sends messages with.

Parameters:
time The new default send timeout value in milliseconds.
virtual void activemq::core::kernels::ActiveMQProducerKernel::setTimeToLive ( long long  time  )  [inline, virtual]

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

Parameters:
time The new default time to live value in milliseconds.

Implements cms::MessageProducer.


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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1