18#ifndef _ACTIVEMQ_CORE_KERNELS_ACTIVEMQPRODUCERKERNEL_H_
19#define _ACTIVEMQ_CORE_KERNELS_ACTIVEMQPRODUCERKERNEL_H_
42 class ActiveMQSessionKernel;
48 bool disableTimestamps;
51 bool disableMessageId;
54 int defaultDeliveryMode;
60 long long defaultTimeToLive;
63 long long sendTimeout;
75 std::auto_ptr<util::MemoryUsage> memoryUsage;
111 long long sendTimeout);
123 virtual void send(
cms::Message* message,
int deliveryMode,
int priority,
long long timeToLive);
132 int deliveryMode,
int priority,
long long timeToLive);
145 this->transformer = transformer;
154 return this->transformer;
162 this->defaultDeliveryMode = mode;
170 return this->defaultDeliveryMode;
178 this->disableMessageId = value;
186 return this->disableMessageId;
194 this->disableTimestamps = value;
202 return this->disableTimestamps;
210 this->defaultPriority = priority;
218 return this->defaultPriority;
226 this->defaultTimeToLive = time;
234 return this->defaultTimeToLive;
242 this->sendTimeout = time;
250 return this->sendTimeout;
266 return this->producerInfo;
275 return this->producerInfo->getProducerId();
302 void checkClosed()
const;
#define AMQCPP_API
Definition: Config.h:30
Definition: ProducerAck.h:47
Definition: ActiveMQProducerKernel.h:44
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,...
virtual void close()
Closes this object and deallocates the appropriate resources.
const Pointer< commands::ProducerInfo > & getProducerInfo() const
Retries this object ProducerInfo pointer.
Definition: ActiveMQProducerKernel.h:264
long long getNextMessageSequence()
Definition: ActiveMQProducerKernel.h:295
bool isClosed() const
Definition: ActiveMQProducerKernel.h:256
virtual bool getDisableMessageTimeStamp() const
Gets if Message Time Stamps are disabled for this Producer.
Definition: ActiveMQProducerKernel.h:201
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,...
virtual void setSendTimeout(long long time)
Sets the Send Timeout that this Producers sends messages with.
Definition: ActiveMQProducerKernel.h:241
virtual void setTimeToLive(long long time)
Sets the Time to Live that this Producers sends messages with.
Definition: ActiveMQProducerKernel.h:225
virtual bool getDisableMessageID() const
Gets if Message Ids are disabled for this Producer.
Definition: ActiveMQProducerKernel.h:185
virtual long long getSendTimeout() const
Gets the Send Timeout that this producer sends messages with.
Definition: ActiveMQProducerKernel.h:249
virtual cms::MessageTransformer * getMessageTransformer() const
Gets the currently configured MessageTransformer for this MessageProducer.
Definition: ActiveMQProducerKernel.h:153
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,...
virtual void setMessageTransformer(cms::MessageTransformer *transformer)
Set an MessageTransformer instance that is applied to all cms::Message objects before they are sent o...
Definition: ActiveMQProducerKernel.h:144
virtual void setDisableMessageTimeStamp(bool value)
Sets if Message Time Stamps are disabled for this Producer.
Definition: ActiveMQProducerKernel.h:193
virtual void onProducerAck(const commands::ProducerAck &ack)
Handles the work of Processing a ProducerAck Command from the Broker.
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,...
virtual void setDisableMessageID(bool value)
Sets if Message Ids are disabled for this Producer.
Definition: ActiveMQProducerKernel.h:177
void dispose()
Performs Producer object cleanup but doesn't attempt to send the Remove command to the broker.
virtual int getPriority() const
Gets the Priority level that this producer sends messages at.
Definition: ActiveMQProducerKernel.h:217
virtual void setDeliveryMode(int mode)
Sets the delivery mode for this Producer.
Definition: ActiveMQProducerKernel.h:161
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,...
virtual long long getTimeToLive() const
Gets the Time to Live that this producer sends messages with.
Definition: ActiveMQProducerKernel.h:233
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,...
virtual ~ActiveMQProducerKernel()
const Pointer< commands::ProducerId > & getProducerId() const
Retries this object ProducerId or NULL if closed.
Definition: ActiveMQProducerKernel.h:273
virtual int getDeliveryMode() const
Gets the delivery mode for this Producer.
Definition: ActiveMQProducerKernel.h:169
virtual void setPriority(int priority)
Sets the Priority that this Producers sends messages at.
Definition: ActiveMQProducerKernel.h:209
virtual void send(cms::Message *message)
Sends the message to the default producer destination, but does not take ownership of the message,...
ActiveMQProducerKernel(ActiveMQSessionKernel *session, const Pointer< commands::ProducerId > &producerId, const Pointer< commands::ActiveMQDestination > &destination, long long sendTimeout)
Constructor, creates an instance of an ActiveMQProducerKernel.
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,...
Definition: ActiveMQSessionKernel.h:67
This class is used to generate a sequence of long long values that are incremented each time a new va...
Definition: LongSequenceGenerator.h:32
long long getNextSequenceId()
Asynchronous event interface for CMS asynchronous operations.
Definition: AsyncCallback.h:37
A Destination object encapsulates a provider-specific address.
Definition: Destination.h:39
Root of all messages.
Definition: Message.h:88
A client uses a MessageProducer object to send messages to a Destination.
Definition: MessageProducer.h:60
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition: CachedConsumer.h:24