18#ifndef _ACTIVEMQ_CMSUTIL_CACHEDPRODUCER_H_
19#define _ACTIVEMQ_CMSUTIL_CACHEDPRODUCER_H_
37 CachedProducer(
const CachedProducer&);
38 CachedProducer& operator=(
const CachedProducer&);
55 producer->send(message);
59 producer->send(message, onComplete);
62 virtual void send(
cms::Message* message,
int deliveryMode,
int priority,
long long timeToLive) {
63 producer->send(message, deliveryMode, priority, timeToLive);
67 producer->send(message, deliveryMode, priority, timeToLive, onComplete);
71 producer->send(destination, message);
75 producer->send(destination, message, onComplete);
79 producer->send(destination, message, deliveryMode, priority, timeToLive);
83 producer->send(destination, message, deliveryMode, priority, timeToLive, onComplete);
87 producer->setDeliveryMode(mode);
91 return producer->getDeliveryMode();
95 producer->setDisableMessageID(value);
99 return producer->getDisableMessageID();
103 producer->setDisableMessageTimeStamp(value);
107 return producer->getDisableMessageTimeStamp();
111 producer->setPriority(priority);
115 return producer->getPriority();
119 producer->setTimeToLive(time);
123 return producer->getTimeToLive();
127 producer->setMessageTransformer(transformer);
131 return producer->getMessageTransformer();
#define AMQCPP_API
Definition Config.h:30
CachedProducer(cms::MessageProducer *producer)
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,...
Definition CachedProducer.h:74
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,...
Definition CachedProducer.h:62
virtual void setMessageTransformer(cms::MessageTransformer *transformer)
Set an MessageTransformer instance that is applied to all cms::Message objects before they are sent o...
Definition CachedProducer.h:126
virtual ~CachedProducer()
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,...
Definition CachedProducer.h:78
virtual bool getDisableMessageID() const
Gets if Message Ids are disabled for this Producer.
Definition CachedProducer.h:98
virtual cms::MessageTransformer * getMessageTransformer() const
Gets the currently configured MessageTransformer for this MessageProducer.
Definition CachedProducer.h:130
virtual void setDisableMessageID(bool value)
Sets if Message Ids are disabled for this Producer.
Definition CachedProducer.h:94
virtual int getDeliveryMode() const
Gets the delivery mode for this Producer.
Definition CachedProducer.h:90
virtual void setTimeToLive(long long time)
Sets the Time to Live that this Producers sends messages with.
Definition CachedProducer.h:118
virtual void setPriority(int priority)
Sets the Priority that this Producers sends messages at.
Definition CachedProducer.h:110
virtual void close()
Does nothing - the real producer resource will be closed by the lifecycle manager.
Definition CachedProducer.h:50
virtual bool getDisableMessageTimeStamp() const
Gets if Message Time Stamps are disabled for this Producer.
Definition CachedProducer.h:106
virtual void setDisableMessageTimeStamp(bool value)
Sets if Message Time Stamps are disabled for this Producer.
Definition CachedProducer.h:102
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,...
Definition CachedProducer.h:58
virtual int getPriority() const
Gets the Priority level that this producer sends messages at.
Definition CachedProducer.h:114
virtual void setDeliveryMode(int mode)
Sets the delivery mode for this Producer.
Definition CachedProducer.h:86
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,...
Definition CachedProducer.h:66
virtual long long getTimeToLive() const
Gets the Time to Live that this producer sends messages with.
Definition CachedProducer.h:122
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,...
Definition CachedProducer.h:82
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,...
Definition CachedProducer.h:70
virtual void send(cms::Message *message)
Sends the message to the default producer destination, but does not take ownership of the message,...
Definition CachedProducer.h:54
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
Definition CachedConsumer.h:25
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24