activemq-cpp-3.9.5
ConsumerInfo.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_CONSUMERINFO_H_
19 #define _ACTIVEMQ_COMMANDS_CONSUMERINFO_H_
20 
21 // Turn off warning message for ignored exception specification
22 #ifdef _MSC_VER
23 #pragma warning( disable : 4290 )
24 #endif
25 
32 #include <activemq/util/Config.h>
33 #include <decaf/lang/Pointer.h>
34 #include <string>
35 #include <vector>
36 
37 namespace activemq {
38 namespace commands {
39 
41 
42  /*
43  *
44  * Command code for OpenWire format for ConsumerInfo
45  *
46  * NOTE!: This file is auto generated - do not modify!
47  * if you need to make a change, please see the Java Classes
48  * in the activemq-cpp-openwire-generator module
49  *
50  */
52  protected:
53 
55  bool browser;
60  std::string selector;
61  std::string clientId;
62  std::string subscriptionName;
63  bool noLocal;
64  bool exclusive;
66  unsigned char priority;
67  std::vector< decaf::lang::Pointer<BrokerId> > brokerPath;
72  std::vector< decaf::lang::Pointer<ConsumerId> > networkConsumerPath;
73 
74  public:
75 
76  const static unsigned char ID_CONSUMERINFO = 5;
77 
78  private:
79 
80  // Prefetch size that is controlled by the Broker.
81  int currentPrefetchSize;
82 
83  private:
84 
85  ConsumerInfo(const ConsumerInfo&);
86  ConsumerInfo& operator= (const ConsumerInfo&);
87 
88  public:
89 
90  ConsumerInfo();
91 
92  virtual ~ConsumerInfo();
93 
94  virtual unsigned char getDataStructureType() const;
95 
96  virtual ConsumerInfo* cloneDataStructure() const;
97 
98  virtual void copyDataStructure(const DataStructure* src);
99 
100  virtual std::string toString() const;
101 
102  virtual bool equals(const DataStructure* value) const;
103 
104  Pointer<RemoveInfo> createRemoveCommand() const;
105 
107  return this->currentPrefetchSize;
108  }
109 
110  void setCurrentPrefetchSize(int currentPrefetchSize) {
111  this->currentPrefetchSize = currentPrefetchSize;
112  }
113 
114  virtual const Pointer<ConsumerId>& getConsumerId() const;
115  virtual Pointer<ConsumerId>& getConsumerId();
116  virtual void setConsumerId(const Pointer<ConsumerId>& consumerId);
117 
118  virtual bool isBrowser() const;
119  virtual void setBrowser(bool browser);
120 
121  virtual const Pointer<ActiveMQDestination>& getDestination() const;
122  virtual Pointer<ActiveMQDestination>& getDestination();
123  virtual void setDestination(const Pointer<ActiveMQDestination>& destination);
124 
125  virtual int getPrefetchSize() const;
126  virtual void setPrefetchSize(int prefetchSize);
127 
128  virtual int getMaximumPendingMessageLimit() const;
129  virtual void setMaximumPendingMessageLimit(int maximumPendingMessageLimit);
130 
131  virtual bool isDispatchAsync() const;
132  virtual void setDispatchAsync(bool dispatchAsync);
133 
134  virtual const std::string& getSelector() const;
135  virtual std::string& getSelector();
136  virtual void setSelector(const std::string& selector);
137 
138  virtual const std::string& getClientId() const;
139  virtual std::string& getClientId();
140  virtual void setClientId(const std::string& clientId);
141 
142  virtual const std::string& getSubscriptionName() const;
143  virtual std::string& getSubscriptionName();
144  virtual void setSubscriptionName(const std::string& subscriptionName);
145 
146  virtual bool isNoLocal() const;
147  virtual void setNoLocal(bool noLocal);
148 
149  virtual bool isExclusive() const;
150  virtual void setExclusive(bool exclusive);
151 
152  virtual bool isRetroactive() const;
153  virtual void setRetroactive(bool retroactive);
154 
155  virtual unsigned char getPriority() const;
156  virtual void setPriority(unsigned char priority);
157 
158  virtual const std::vector< decaf::lang::Pointer<BrokerId> >& getBrokerPath() const;
159  virtual std::vector< decaf::lang::Pointer<BrokerId> >& getBrokerPath();
160  virtual void setBrokerPath(const std::vector< decaf::lang::Pointer<BrokerId> >& brokerPath);
161 
162  virtual const Pointer<BooleanExpression>& getAdditionalPredicate() const;
163  virtual Pointer<BooleanExpression>& getAdditionalPredicate();
164  virtual void setAdditionalPredicate(const Pointer<BooleanExpression>& additionalPredicate);
165 
166  virtual bool isNetworkSubscription() const;
167  virtual void setNetworkSubscription(bool networkSubscription);
168 
169  virtual bool isOptimizedAcknowledge() const;
170  virtual void setOptimizedAcknowledge(bool optimizedAcknowledge);
171 
172  virtual bool isNoRangeAcks() const;
173  virtual void setNoRangeAcks(bool noRangeAcks);
174 
175  virtual const std::vector< decaf::lang::Pointer<ConsumerId> >& getNetworkConsumerPath() const;
176  virtual std::vector< decaf::lang::Pointer<ConsumerId> >& getNetworkConsumerPath();
177  virtual void setNetworkConsumerPath(const std::vector< decaf::lang::Pointer<ConsumerId> >& networkConsumerPath);
178 
182  virtual bool isConsumerInfo() const {
183  return true;
184  }
185 
186  virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor);
187 
188  };
189 
190 }}
191 
192 #endif /*_ACTIVEMQ_COMMANDS_CONSUMERINFO_H_*/
bool noRangeAcks
Definition: ConsumerInfo.h:71
Pointer< ConsumerId > consumerId
Definition: ConsumerInfo.h:54
Pointer< ActiveMQDestination > destination
Definition: ConsumerInfo.h:56
std::string subscriptionName
Definition: ConsumerInfo.h:62
bool optimizedAcknowledge
Definition: ConsumerInfo.h:70
#define AMQCPP_API
Definition: Config.h:30
std::string selector
Definition: ConsumerInfo.h:60
unsigned char priority
Definition: ConsumerInfo.h:66
int getCurrentPrefetchSize() const
Definition: ConsumerInfo.h:106
void setCurrentPrefetchSize(int currentPrefetchSize)
Definition: ConsumerInfo.h:110
std::string clientId
Definition: ConsumerInfo.h:61
Definition: DataStructure.h:27
Interface for an Object that can visit the various Command Objects that are sent from and to this cli...
Definition: CommandVisitor.h:69
bool browser
Definition: ConsumerInfo.h:55
bool dispatchAsync
Definition: ConsumerInfo.h:59
Definition: ConsumerInfo.h:51
bool retroactive
Definition: ConsumerInfo.h:65
Definition: BaseCommand.h:27
std::vector< decaf::lang::Pointer< BrokerId > > brokerPath
Definition: ConsumerInfo.h:67
virtual bool isConsumerInfo() const
Definition: ConsumerInfo.h:182
int prefetchSize
Definition: ConsumerInfo.h:57
bool exclusive
Definition: ConsumerInfo.h:64
bool networkSubscription
Definition: ConsumerInfo.h:69
std::vector< decaf::lang::Pointer< ConsumerId > > networkConsumerPath
Definition: ConsumerInfo.h:72
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
bool noLocal
Definition: ConsumerInfo.h:63
Pointer< BooleanExpression > additionalPredicate
Definition: ConsumerInfo.h:68
int maximumPendingMessageLimit
Definition: ConsumerInfo.h:58