activemq-cpp-3.4.0

src/main/cms/MessageProducer.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef _CMS_MESSAGEPRODUCER_H_
00019 #define _CMS_MESSAGEPRODUCER_H_
00020 
00021 #include <cms/Config.h>
00022 #include <cms/Message.h>
00023 #include <cms/Destination.h>
00024 #include <cms/Closeable.h>
00025 #include <cms/CMSException.h>
00026 #include <cms/InvalidDestinationException.h>
00027 #include <cms/MessageFormatException.h>
00028 #include <cms/UnsupportedOperationException.h>
00029 #include <cms/DeliveryMode.h>
00030 
00031 namespace cms{
00032 
00057     class CMS_API MessageProducer : public Closeable {
00058     public:
00059 
00060         virtual ~MessageProducer() throw();
00061 
00077         virtual void send( Message* message ) = 0;
00078 
00099         virtual void send( Message* message, int deliveryMode, int priority, long long timeToLive ) = 0;
00100 
00118         virtual void send( const Destination* destination, Message* message ) = 0;
00119 
00142         virtual void send( const Destination* destination, Message* message,
00143                            int deliveryMode, int priority, long long timeToLive ) = 0;
00144 
00153         virtual void setDeliveryMode( int mode ) = 0;
00154 
00162         virtual int getDeliveryMode() const = 0;
00163 
00172         virtual void setDisableMessageID( bool value ) = 0;
00173 
00181         virtual bool getDisableMessageID() const = 0;
00182 
00189         virtual void setDisableMessageTimeStamp( bool value ) = 0;
00190 
00198         virtual bool getDisableMessageTimeStamp() const = 0;
00199 
00208         virtual void setPriority( int priority ) = 0;
00209 
00217         virtual int getPriority() const = 0;
00218 
00229         virtual void setTimeToLive( long long time ) = 0;
00230 
00238         virtual long long getTimeToLive() const = 0;
00239 
00240     };
00241 
00242 }
00243 
00244 #endif /*_CMS_MESSAGEPRODUCER_H_*/