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
33#include <decaf/lang/Pointer.h>
34#include <string>
35#include <vector>
36
37namespace activemq {
38namespace commands {
39
40 using decaf::lang::Pointer;
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 */
51 class AMQCPP_API ConsumerInfo : public BaseCommand {
52 protected:
53
55 bool browser;
60 std::string selector;
61 std::string clientId;
62 std::string subscriptionName;
63 bool noLocal;
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
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
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;
117
118 virtual bool isBrowser() const;
119 virtual void setBrowser(bool browser);
120
124
125 virtual int getPrefetchSize() const;
126 virtual void setPrefetchSize(int prefetchSize);
127
128 virtual int getMaximumPendingMessageLimit() const;
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
165
166 virtual bool isNetworkSubscription() const;
168
169 virtual bool isOptimizedAcknowledge() const;
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();
178
182 virtual bool isConsumerInfo() const {
183 return true;
184 }
185
187
188 };
189
190}}
191
192#endif /*_ACTIVEMQ_COMMANDS_CONSUMERINFO_H_*/
#define AMQCPP_API
Definition Config.h:30
BaseCommand()
Definition BaseCommand.h:35
virtual void setMaximumPendingMessageLimit(int maximumPendingMessageLimit)
virtual bool isNoLocal() const
virtual bool equals(const DataStructure *value) const
Compares the DataStructure passed in to this one, and returns if they are equivalent.
virtual unsigned char getPriority() const
virtual Pointer< BooleanExpression > & getAdditionalPredicate()
virtual const Pointer< ConsumerId > & getConsumerId() const
bool optimizedAcknowledge
Definition ConsumerInfo.h:70
virtual void setDestination(const Pointer< ActiveMQDestination > &destination)
virtual void setNetworkConsumerPath(const std::vector< decaf::lang::Pointer< ConsumerId > > &networkConsumerPath)
Pointer< RemoveInfo > createRemoveCommand() const
virtual void setExclusive(bool exclusive)
virtual std::vector< decaf::lang::Pointer< ConsumerId > > & getNetworkConsumerPath()
Pointer< ConsumerId > consumerId
Definition ConsumerInfo.h:54
virtual bool isNoRangeAcks() const
bool browser
Definition ConsumerInfo.h:55
std::vector< decaf::lang::Pointer< ConsumerId > > networkConsumerPath
Definition ConsumerInfo.h:72
virtual void copyDataStructure(const DataStructure *src)
Copy the contents of the passed object into this objects members, overwriting any existing data.
Pointer< BooleanExpression > additionalPredicate
Definition ConsumerInfo.h:68
virtual bool isRetroactive() const
bool noRangeAcks
Definition ConsumerInfo.h:71
bool exclusive
Definition ConsumerInfo.h:64
virtual void setNoRangeAcks(bool noRangeAcks)
virtual std::string & getSubscriptionName()
virtual void setBrokerPath(const std::vector< decaf::lang::Pointer< BrokerId > > &brokerPath)
bool dispatchAsync
Definition ConsumerInfo.h:59
virtual bool isExclusive() const
std::string selector
Definition ConsumerInfo.h:60
std::string clientId
Definition ConsumerInfo.h:61
virtual const Pointer< ActiveMQDestination > & getDestination() const
virtual std::string & getSelector()
std::string subscriptionName
Definition ConsumerInfo.h:62
bool noLocal
Definition ConsumerInfo.h:63
virtual const std::string & getSubscriptionName() const
virtual void setDispatchAsync(bool dispatchAsync)
virtual Pointer< ActiveMQDestination > & getDestination()
int maximumPendingMessageLimit
Definition ConsumerInfo.h:58
virtual const std::vector< decaf::lang::Pointer< BrokerId > > & getBrokerPath() const
virtual void setAdditionalPredicate(const Pointer< BooleanExpression > &additionalPredicate)
virtual void setOptimizedAcknowledge(bool optimizedAcknowledge)
static const unsigned char ID_CONSUMERINFO
Definition ConsumerInfo.h:76
virtual void setClientId(const std::string &clientId)
virtual int getMaximumPendingMessageLimit() const
virtual bool isOptimizedAcknowledge() const
int prefetchSize
Definition ConsumerInfo.h:57
bool networkSubscription
Definition ConsumerInfo.h:69
virtual const std::vector< decaf::lang::Pointer< ConsumerId > > & getNetworkConsumerPath() const
virtual void setNetworkSubscription(bool networkSubscription)
virtual ConsumerInfo * cloneDataStructure() const
Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of ...
virtual bool isNetworkSubscription() const
virtual void setConsumerId(const Pointer< ConsumerId > &consumerId)
virtual int getPrefetchSize() const
virtual void setPriority(unsigned char priority)
virtual std::string & getClientId()
virtual void setPrefetchSize(int prefetchSize)
virtual bool isConsumerInfo() const
Definition ConsumerInfo.h:182
bool retroactive
Definition ConsumerInfo.h:65
virtual std::string toString() const
Returns a string containing the information for this DataStructure such as its type and value of its ...
virtual Pointer< ConsumerId > & getConsumerId()
virtual void setRetroactive(bool retroactive)
void setCurrentPrefetchSize(int currentPrefetchSize)
Definition ConsumerInfo.h:110
virtual const std::string & getSelector() const
std::vector< decaf::lang::Pointer< BrokerId > > brokerPath
Definition ConsumerInfo.h:67
virtual bool isBrowser() const
virtual std::vector< decaf::lang::Pointer< BrokerId > > & getBrokerPath()
unsigned char priority
Definition ConsumerInfo.h:66
Pointer< ActiveMQDestination > destination
Definition ConsumerInfo.h:56
virtual unsigned char getDataStructureType() const
Get the DataStructure Type as defined in CommandTypes.h.
virtual bool isDispatchAsync() const
virtual Pointer< Command > visit(activemq::state::CommandVisitor *visitor)
Allows a Visitor to visit this command and return a response to the command based on the command type...
virtual void setSelector(const std::string &selector)
virtual void setNoLocal(bool noLocal)
virtual const std::string & getClientId() const
int getCurrentPrefetchSize() const
Definition ConsumerInfo.h:106
virtual void setSubscriptionName(const std::string &subscriptionName)
virtual void setBrowser(bool browser)
virtual const Pointer< BooleanExpression > & getAdditionalPredicate() const
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
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
Definition ActiveMQBlobMessage.h:28
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24