activemq-cpp-3.9.5
MessageProducer.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _CMS_MESSAGEPRODUCER_H_
19#define _CMS_MESSAGEPRODUCER_H_
20
21#include <cms/Config.h>
22#include <cms/AsyncCallback.h>
23#include <cms/Message.h>
24#include <cms/Destination.h>
25#include <cms/Closeable.h>
26#include <cms/CMSException.h>
30#include <cms/DeliveryMode.h>
31
32namespace cms {
33
35
61 public:
62
64
80 virtual void send(Message* message) = 0;
81
103 virtual void send(Message* message, AsyncCallback* onComplete) = 0;
104
125 virtual void send(Message* message, int deliveryMode, int priority, long long timeToLive) = 0;
126
153 virtual void send(Message* message, int deliveryMode, int priority,
154 long long timeToLive, AsyncCallback* onComplete) = 0;
155
173 virtual void send(const Destination* destination, Message* message) = 0;
174
198 virtual void send(const Destination* destination, Message* message, AsyncCallback* onComplete) = 0;
199
222 virtual void send(const Destination* destination, Message* message,
223 int deliveryMode, int priority, long long timeToLive) = 0;
224
253 virtual void send(const Destination* destination, Message* message, int deliveryMode,
254 int priority, long long timeToLive, AsyncCallback* onComplete) = 0;
255
264 virtual void setDeliveryMode(int mode) = 0;
265
273 virtual int getDeliveryMode() const = 0;
274
283 virtual void setDisableMessageID(bool value) = 0;
284
292 virtual bool getDisableMessageID() const = 0;
293
300 virtual void setDisableMessageTimeStamp(bool value) = 0;
301
309 virtual bool getDisableMessageTimeStamp() const = 0;
310
319 virtual void setPriority(int priority) = 0;
320
328 virtual int getPriority() const = 0;
329
340 virtual void setTimeToLive(long long time) = 0;
341
349 virtual long long getTimeToLive() const = 0;
350
362 virtual void setMessageTransformer(cms::MessageTransformer* transformer) = 0;
363
370
371 };
372
373}
374
375#endif /*_CMS_MESSAGEPRODUCER_H_*/
Asynchronous event interface for CMS asynchronous operations.
Definition AsyncCallback.h:37
Interface for a class that implements the close method.
Definition Closeable.h:35
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
virtual void setMessageTransformer(cms::MessageTransformer *transformer)=0
Set an MessageTransformer instance that is applied to all cms::Message objects before they are sent o...
virtual void setDisableMessageID(bool value)=0
Sets if Message Ids are disabled for this Producer.
virtual void send(Message *message, AsyncCallback *onComplete)=0
Sends the message to the default producer destination, but does not take ownership of the message,...
virtual int getPriority() const =0
Gets the Priority level that this producer sends messages at.
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,...
virtual void send(const Destination *destination, Message *message)=0
Sends the message to the designated destination, but does not take ownership of the message,...
virtual long long getTimeToLive() const =0
Gets the Time to Live that this producer sends messages with.
virtual void send(const Destination *destination, Message *message, AsyncCallback *onComplete)=0
Sends the message to the designated destination, but does not take ownership of the message,...
virtual void send(Message *message)=0
Sends the message to the default producer destination, but does not take ownership of the message,...
virtual void setTimeToLive(long long time)=0
Sets the Time to Live that this Producers sends messages with.
virtual void setPriority(int priority)=0
Sets the Priority that this Producers sends messages at.
virtual void setDisableMessageTimeStamp(bool value)=0
Sets if Message Time Stamps are disabled for this Producer.
virtual void send(const Destination *destination, Message *message, int deliveryMode, int priority, long long timeToLive, AsyncCallback *onComplete)=0
Sends the message to the designated destination, but does not take ownership of the message,...
virtual cms::MessageTransformer * getMessageTransformer() const =0
Gets the currently configured MessageTransformer for this MessageProducer.
virtual ~MessageProducer()
virtual void setDeliveryMode(int mode)=0
Sets the delivery mode for this Producer.
virtual bool getDisableMessageTimeStamp() const =0
Gets if Message Time Stamps are disabled for this Producer.
virtual bool getDisableMessageID() const =0
Gets if Message Ids are disabled for this Producer.
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,...
virtual int getDeliveryMode() const =0
Gets the delivery mode for this Producer.
virtual void send(Message *message, int deliveryMode, int priority, long long timeToLive, AsyncCallback *onComplete)=0
Sends the message to the default producer destination, but does not take ownership of the message,...
Provides an interface for clients to transform cms::Message objects inside the CMS MessageProducer an...
Definition MessageTransformer.h:37
#define CMS_API
Definition Config.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition DestinationResolver.h:23