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_ACTIVEMQTEMPQUEUE_H_ 00019 #define _ACTIVEMQ_COMMANDS_ACTIVEMQTEMPQUEUE_H_ 00020 00021 #include <activemq/util/Config.h> 00022 #include <activemq/commands/ActiveMQTempDestination.h> 00023 #include <cms/TemporaryQueue.h> 00024 #include <vector> 00025 #include <string> 00026 #include <memory> 00027 00028 namespace activemq { 00029 namespace commands { 00030 00031 class AMQCPP_API ActiveMQTempQueue: public ActiveMQTempDestination, public cms::TemporaryQueue { 00032 public: 00033 00034 const static unsigned char ID_ACTIVEMQTEMPQUEUE = 102; 00035 00036 private: 00037 00038 ActiveMQTempQueue(const ActiveMQTempQueue&); 00039 ActiveMQTempQueue& operator=(const ActiveMQTempQueue&); 00040 00041 public: 00042 00043 ActiveMQTempQueue(); 00044 ActiveMQTempQueue(const std::string& name); 00045 virtual ~ActiveMQTempQueue() throw (); 00046 00047 virtual unsigned char getDataStructureType() const; 00048 00049 virtual ActiveMQTempQueue* cloneDataStructure() const; 00050 00051 virtual void copyDataStructure(const DataStructure* src); 00052 00053 virtual std::string toString() const; 00054 00055 virtual bool equals(const DataStructure* value) const; 00056 00057 virtual const cms::TemporaryQueue* getCMSDestination() const { 00058 return this; 00059 } 00060 00061 public: // CMS Destination 00062 00063 virtual cms::Destination::DestinationType getDestinationType() const { 00064 return cms::Destination::TEMPORARY_QUEUE; 00065 } 00066 00067 virtual cms::Destination* clone() const { 00068 return dynamic_cast<cms::Destination*>(this->cloneDataStructure()); 00069 } 00070 00071 virtual void copy(const cms::Destination& source) { 00072 this->copyDataStructure(dynamic_cast<const DataStructure*>(&source)); 00073 } 00074 00075 virtual const cms::CMSProperties& getCMSProperties() const { 00076 return this->getOptions(); 00077 } 00078 00079 virtual bool equals(const cms::Destination& other) const; 00080 00081 public: 00082 00083 virtual std::string getQueueName() const { 00084 return this->getPhysicalName(); 00085 } 00086 00087 virtual void destroy(); 00088 00089 }; 00090 00091 }} 00092 00093 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQTEMPQUEUE_H_*/
1.6.1