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_ACTIVEMQTEMPDESTINATION_H_ 00019 #define _ACTIVEMQ_COMMANDS_ACTIVEMQTEMPDESTINATION_H_ 00020 00021 #include <activemq/util/Config.h> 00022 #include <activemq/commands/ActiveMQDestination.h> 00023 #include <activemq/exceptions/ActiveMQException.h> 00024 #include <cms/Closeable.h> 00025 #include <vector> 00026 #include <string> 00027 00028 namespace activemq{ 00029 namespace core{ 00030 class ActiveMQConnection; 00031 } 00032 namespace commands{ 00033 00034 class AMQCPP_API ActiveMQTempDestination : public ActiveMQDestination, 00035 public cms::Closeable { 00036 protected: 00037 00042 core::ActiveMQConnection* connection; 00043 00047 std::string connectionId; 00048 00049 int sequenceId; 00050 00051 public: 00052 00053 const static unsigned char ID_ACTIVEMQTEMPDESTINATION = 0; 00054 00055 private: 00056 00057 ActiveMQTempDestination(const ActiveMQTempDestination&); 00058 ActiveMQTempDestination& operator=(const ActiveMQTempDestination&); 00059 00060 public: 00061 00062 ActiveMQTempDestination(); 00063 ActiveMQTempDestination(const std::string& name); 00064 virtual ~ActiveMQTempDestination() throw(); 00065 00066 virtual unsigned char getDataStructureType() const; 00067 00068 virtual ActiveMQTempDestination* cloneDataStructure() const { 00069 return NULL; 00070 } 00071 00072 virtual void copyDataStructure(const DataStructure* src) { 00073 ActiveMQDestination::copyDataStructure(src); 00074 } 00075 00076 virtual std::string toString() const; 00077 00078 virtual bool equals(const DataStructure* value) const { 00079 return ActiveMQDestination::equals(value); 00080 } 00081 00082 virtual void close(); 00083 00084 virtual void setPhysicalName(const std::string& physicalName); 00085 00093 void setConnection(core::ActiveMQConnection* connection) { 00094 this->connection = connection; 00095 } 00096 00102 core::ActiveMQConnection* getConnection() const { 00103 return this->connection; 00104 } 00105 00109 std::string getConnectionId() const { 00110 return this->connectionId; 00111 } 00112 }; 00113 00114 }} 00115 00116 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQTEMPDESTINATION_H_*/
1.6.1