activemq-cpp-3.8.2
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 subscriptionName;
62  bool noLocal;
63  bool exclusive;
65  unsigned char priority;
66  std::vector< decaf::lang::Pointer<BrokerId> > brokerPath;
71  std::vector< decaf::lang::Pointer<ConsumerId> > networkConsumerPath;
72 
73  public:
74 
75  const static unsigned char ID_CONSUMERINFO = 5;
76 
77  private:
78 
79  // Prefetch size that is controlled by the Broker.
80  int currentPrefetchSize;
81 
82  private:
83 
84  ConsumerInfo(const ConsumerInfo&);
85  ConsumerInfo& operator= (const ConsumerInfo&);
86 
87  public:
88 
89  ConsumerInfo();
90 
91  virtual ~ConsumerInfo();
92 
93  virtual unsigned char getDataStructureType() const;
94 
95  virtual ConsumerInfo* cloneDataStructure() const;
96 
97  virtual void copyDataStructure(const DataStructure* src);
98 
99  virtual std::string toString() const;
100 
101  virtual bool equals(const DataStructure* value) const;
102 
103  Pointer<RemoveInfo> createRemoveCommand() const;
104 
106  return this->currentPrefetchSize;
107  }
108 
109  void setCurrentPrefetchSize(int currentPrefetchSize) {
110  this->currentPrefetchSize = currentPrefetchSize;
111  }
112 
113  virtual const Pointer<ConsumerId>& getConsumerId() const;
114  virtual Pointer<ConsumerId>& getConsumerId();
115  virtual void setConsumerId( const Pointer<ConsumerId>& consumerId );
116 
117  virtual bool isBrowser() const;
118  virtual void setBrowser( bool browser );
119 
120  virtual const Pointer<ActiveMQDestination>& getDestination() const;
121  virtual Pointer<ActiveMQDestination>& getDestination();
122  virtual void setDestination( const Pointer<ActiveMQDestination>& destination );
123 
124  virtual int getPrefetchSize() const;
125  virtual void setPrefetchSize( int prefetchSize );
126 
127  virtual int getMaximumPendingMessageLimit() const;
128  virtual void setMaximumPendingMessageLimit( int maximumPendingMessageLimit );
129 
130  virtual bool isDispatchAsync() const;
131  virtual void setDispatchAsync( bool dispatchAsync );
132 
133  virtual const std::string& getSelector() const;
134  virtual std::string& getSelector();
135  virtual void setSelector( const std::string& selector );
136 
137  virtual const std::string& getSubscriptionName() const;
138  virtual std::string& getSubscriptionName();
139  virtual void setSubscriptionName( const std::string& subscriptionName );
140 
141  virtual bool isNoLocal() const;
142  virtual void setNoLocal( bool noLocal );
143 
144  virtual bool isExclusive() const;
145  virtual void setExclusive( bool exclusive );
146 
147  virtual bool isRetroactive() const;
148  virtual void setRetroactive( bool retroactive );
149 
150  virtual unsigned char getPriority() const;
151  virtual void setPriority( unsigned char priority );
152 
153  virtual const std::vector< decaf::lang::Pointer<BrokerId> >& getBrokerPath() const;
154  virtual std::vector< decaf::lang::Pointer<BrokerId> >& getBrokerPath();
155  virtual void setBrokerPath( const std::vector< decaf::lang::Pointer<BrokerId> >& brokerPath );
156 
157  virtual const Pointer<BooleanExpression>& getAdditionalPredicate() const;
158  virtual Pointer<BooleanExpression>& getAdditionalPredicate();
159  virtual void setAdditionalPredicate( const Pointer<BooleanExpression>& additionalPredicate );
160 
161  virtual bool isNetworkSubscription() const;
162  virtual void setNetworkSubscription( bool networkSubscription );
163 
164  virtual bool isOptimizedAcknowledge() const;
165  virtual void setOptimizedAcknowledge( bool optimizedAcknowledge );
166 
167  virtual bool isNoRangeAcks() const;
168  virtual void setNoRangeAcks( bool noRangeAcks );
169 
170  virtual const std::vector< decaf::lang::Pointer<ConsumerId> >& getNetworkConsumerPath() const;
171  virtual std::vector< decaf::lang::Pointer<ConsumerId> >& getNetworkConsumerPath();
172  virtual void setNetworkConsumerPath( const std::vector< decaf::lang::Pointer<ConsumerId> >& networkConsumerPath );
173 
177  virtual bool isConsumerInfo() const {
178  return true;
179  }
180 
181  virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor);
182 
183  };
184 
185 }}
186 
187 #endif /*_ACTIVEMQ_COMMANDS_CONSUMERINFO_H_*/
bool noRangeAcks
Definition: ConsumerInfo.h:70
Pointer< ConsumerId > consumerId
Definition: ConsumerInfo.h:54
Pointer< ActiveMQDestination > destination
Definition: ConsumerInfo.h:56
std::string subscriptionName
Definition: ConsumerInfo.h:61
bool optimizedAcknowledge
Definition: ConsumerInfo.h:69
#define AMQCPP_API
Definition: Config.h:30
std::string selector
Definition: ConsumerInfo.h:60
unsigned char priority
Definition: ConsumerInfo.h:65
void setCurrentPrefetchSize(int currentPrefetchSize)
Definition: ConsumerInfo.h:109
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:64
Definition: BaseCommand.h:27
virtual bool isConsumerInfo() const
Definition: ConsumerInfo.h:177
std::vector< decaf::lang::Pointer< BrokerId > > brokerPath
Definition: ConsumerInfo.h:66
int prefetchSize
Definition: ConsumerInfo.h:57
bool exclusive
Definition: ConsumerInfo.h:63
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
int getCurrentPrefetchSize() const
Definition: ConsumerInfo.h:105
bool networkSubscription
Definition: ConsumerInfo.h:68
std::vector< decaf::lang::Pointer< ConsumerId > > networkConsumerPath
Definition: ConsumerInfo.h:71
Decaf&#39;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:62
Pointer< BooleanExpression > additionalPredicate
Definition: ConsumerInfo.h:67
int maximumPendingMessageLimit
Definition: ConsumerInfo.h:58