activemq-cpp-3.9.5
ActiveMQTempDestination.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 _ACTIVEMQ_COMMANDS_ACTIVEMQTEMPDESTINATION_H_
19 #define _ACTIVEMQ_COMMANDS_ACTIVEMQTEMPDESTINATION_H_
20 
21 #include <activemq/util/Config.h>
24 #include <cms/Closeable.h>
25 #include <vector>
26 #include <string>
27 
28 namespace activemq{
29 namespace core{
30  class ActiveMQConnection;
31 }
32 namespace commands{
33 
35  public cms::Closeable,
36  public decaf::lang::Comparable<ActiveMQTempDestination> {
37  public:
38 
41  using ActiveMQDestination::operator<;
42  using ActiveMQDestination::operator==;
43 
44  protected:
45 
51 
55  std::string connectionId;
56 
58 
59  public:
60 
61  const static unsigned char ID_ACTIVEMQTEMPDESTINATION = 0;
62 
63  private:
64 
67 
68  public:
69 
71  ActiveMQTempDestination(const std::string& name);
72  virtual ~ActiveMQTempDestination() throw();
73 
74  virtual unsigned char getDataStructureType() const;
75 
76  virtual ActiveMQTempDestination* cloneDataStructure() const {
77  return NULL;
78  }
79 
80  virtual void copyDataStructure(const DataStructure* src) {
82  }
83 
84  virtual std::string toString() const;
85 
86  virtual bool equals(const DataStructure* value) const {
87  return ActiveMQDestination::equals(value);
88  }
89 
90  virtual int compareTo(const ActiveMQTempDestination& value) const {
91  return ActiveMQDestination::compareTo(value);
92  }
93 
94  virtual bool equals(const ActiveMQTempDestination& value) const {
95  return ActiveMQDestination::equals(&value);
96  }
97 
98  virtual bool operator==(const ActiveMQTempDestination& value) const {
99  return ActiveMQDestination::equals(&value);
100  }
101 
102  virtual bool operator<(const ActiveMQTempDestination& value) const {
103  return ActiveMQDestination::compareTo(value) < 0;
104  }
105 
106  virtual void close();
107 
108  virtual void setPhysicalName(const std::string& physicalName);
109 
118  this->connection = connection;
119  }
120 
127  return this->connection;
128  }
129 
133  std::string getConnectionId() const {
134  return this->connectionId;
135  }
136  };
137 
138 }}
139 
140 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQTEMPDESTINATION_H_*/
virtual int compareTo(const ActiveMQDestination &value) const
virtual bool equals(const DataStructure *value) const
Compares the DataStructure passed in to this one, and returns if they are equivalent.
Definition: ActiveMQTempDestination.h:86
Definition: ActiveMQTempDestination.h:34
virtual void copyDataStructure(const DataStructure *src)
Copy the contents of the passed object into this objects members, overwriting any existing data...
Definition: ActiveMQTempDestination.h:80
#define AMQCPP_API
Definition: Config.h:30
core::ActiveMQConnection * getConnection() const
Retrieves the Parent Connection that created this Connection.
Definition: ActiveMQTempDestination.h:126
#define NULL
Definition: Config.h:33
Interface for a class that implements the close method.
Definition: Closeable.h:35
virtual bool operator<(const ActiveMQTempDestination &value) const
Definition: ActiveMQTempDestination.h:102
virtual bool equals(const DataStructure *value) const
Compares the DataStructure passed in to this one, and returns if they are equivalent.
virtual bool equals(const ActiveMQTempDestination &value) const
Definition: ActiveMQTempDestination.h:94
void setConnection(core::ActiveMQConnection *connection)
Sets the Parent Connection that is notified when this destination is destroyed.
Definition: ActiveMQTempDestination.h:117
std::string getConnectionId() const
Definition: ActiveMQTempDestination.h:133
Definition: DataStructure.h:27
core::ActiveMQConnection * connection
Connection that we call back on close to allow this resource to be cleaned up correctly at this end a...
Definition: ActiveMQTempDestination.h:50
int sequenceId
Definition: ActiveMQTempDestination.h:57
virtual void copyDataStructure(const DataStructure *src)
Copy the contents of the passed object into this objects members, overwriting any existing data...
virtual int compareTo(const ActiveMQTempDestination &value) const
Definition: ActiveMQTempDestination.h:90
#define const
Definition: zconf.h:198
Concrete connection used for all connectors to the ActiveMQ broker.
Definition: ActiveMQConnection.h:61
virtual bool operator==(const ActiveMQTempDestination &value) const
Definition: ActiveMQTempDestination.h:98
std::string connectionId
The Connection Id of the Connection that created this Temporary Destination.
Definition: ActiveMQTempDestination.h:55
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33
Definition: ActiveMQDestination.h:38