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 _ACTIVEMQ_COMMANDS_ACTIVEMQQUEUE_H_ 00019 #define _ACTIVEMQ_COMMANDS_ACTIVEMQQUEUE_H_ 00020 00021 // Turn off warning message for ignored exception specification 00022 #ifdef _MSC_VER 00023 #pragma warning( disable : 4290 ) 00024 #endif 00025 00026 #include <activemq/util/Config.h> 00027 #include <activemq/commands/ActiveMQDestination.h> 00028 #include <activemq/exceptions/ActiveMQException.h> 00029 #include <decaf/lang/Exception.h> 00030 #include <cms/Queue.h> 00031 #include <vector> 00032 #include <string> 00033 #include <memory> 00034 00035 namespace activemq { 00036 namespace commands { 00037 00038 class AMQCPP_API ActiveMQQueue : public ActiveMQDestination, public cms::Queue { 00039 public: 00040 00041 const static unsigned char ID_ACTIVEMQQUEUE = 100; 00042 00043 private: 00044 00045 ActiveMQQueue(const ActiveMQQueue&); 00046 ActiveMQQueue& operator=(const ActiveMQQueue&); 00047 00048 public: 00049 00050 ActiveMQQueue(); 00051 00052 ActiveMQQueue(const std::string& name); 00053 00054 virtual ~ActiveMQQueue() throw (); 00055 00056 virtual unsigned char getDataStructureType() const; 00057 00058 virtual ActiveMQQueue* cloneDataStructure() const; 00059 00060 virtual void copyDataStructure(const DataStructure* src); 00061 00062 virtual std::string toString() const; 00063 00064 virtual bool equals(const DataStructure* value) const; 00065 00066 virtual const cms::Queue* getCMSDestination() const { 00067 return this; 00068 } 00069 00070 public: // CMS Destination 00071 00072 virtual cms::Destination::DestinationType getDestinationType() const { 00073 return cms::Destination::QUEUE; 00074 } 00075 00076 virtual cms::Destination* clone() const { 00077 return dynamic_cast<cms::Destination*>(this->cloneDataStructure()); 00078 } 00079 00080 virtual void copy(const cms::Destination& source) { 00081 this->copyDataStructure(dynamic_cast<const DataStructure*>(&source)); 00082 } 00083 00084 virtual const cms::CMSProperties& getCMSProperties() const { 00085 return this->getOptions(); 00086 } 00087 00088 virtual bool equals(const cms::Destination& other) const; 00089 00090 public: // CMS Queue 00091 00092 virtual std::string getQueueName() const { 00093 return this->getPhysicalName(); 00094 } 00095 00096 }; 00097 00098 }} 00099 00100 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQQUEUE_H_*/
1.6.1