]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | /** |
2 | * Autogenerated by Thrift Compiler (0.11.0) | |
3 | * | |
4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | |
5 | * @generated | |
6 | */ | |
7 | #ifndef BaggageRestrictionManager_H | |
8 | #define BaggageRestrictionManager_H | |
9 | ||
10 | #include <thrift/TDispatchProcessor.h> | |
11 | #include <thrift/async/TConcurrentClientSyncInfo.h> | |
12 | #include "baggage_types.h" | |
13 | ||
14 | namespace jaegertracing { namespace thrift { | |
15 | ||
16 | #ifdef _MSC_VER | |
17 | #pragma warning( push ) | |
18 | #pragma warning (disable : 4250 ) //inheriting methods via dominance | |
19 | #endif | |
20 | ||
21 | class BaggageRestrictionManagerIf { | |
22 | public: | |
23 | virtual ~BaggageRestrictionManagerIf() {} | |
24 | ||
25 | /** | |
26 | * getBaggageRestrictions retrieves the baggage restrictions for a specific service. | |
27 | * Usually, baggageRestrictions apply to all services however there may be situations | |
28 | * where a baggageKey might only be allowed to be set by a specific service. | |
29 | * | |
30 | * @param serviceName | |
31 | */ | |
32 | virtual void getBaggageRestrictions(std::vector<BaggageRestriction> & _return, const std::string& serviceName) = 0; | |
33 | }; | |
34 | ||
35 | class BaggageRestrictionManagerIfFactory { | |
36 | public: | |
37 | typedef BaggageRestrictionManagerIf Handler; | |
38 | ||
39 | virtual ~BaggageRestrictionManagerIfFactory() {} | |
40 | ||
41 | virtual BaggageRestrictionManagerIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; | |
42 | virtual void releaseHandler(BaggageRestrictionManagerIf* /* handler */) = 0; | |
43 | }; | |
44 | ||
45 | class BaggageRestrictionManagerIfSingletonFactory : virtual public BaggageRestrictionManagerIfFactory { | |
46 | public: | |
47 | BaggageRestrictionManagerIfSingletonFactory(const ::std::shared_ptr<BaggageRestrictionManagerIf>& iface) : iface_(iface) {} | |
48 | virtual ~BaggageRestrictionManagerIfSingletonFactory() {} | |
49 | ||
50 | virtual BaggageRestrictionManagerIf* getHandler(const ::apache::thrift::TConnectionInfo&) { | |
51 | return iface_.get(); | |
52 | } | |
53 | virtual void releaseHandler(BaggageRestrictionManagerIf* /* handler */) {} | |
54 | ||
55 | protected: | |
56 | ::std::shared_ptr<BaggageRestrictionManagerIf> iface_; | |
57 | }; | |
58 | ||
59 | class BaggageRestrictionManagerNull : virtual public BaggageRestrictionManagerIf { | |
60 | public: | |
61 | virtual ~BaggageRestrictionManagerNull() {} | |
62 | void getBaggageRestrictions(std::vector<BaggageRestriction> & /* _return */, const std::string& /* serviceName */) { | |
63 | return; | |
64 | } | |
65 | }; | |
66 | ||
67 | typedef struct _BaggageRestrictionManager_getBaggageRestrictions_args__isset { | |
68 | _BaggageRestrictionManager_getBaggageRestrictions_args__isset() : serviceName(false) {} | |
69 | bool serviceName :1; | |
70 | } _BaggageRestrictionManager_getBaggageRestrictions_args__isset; | |
71 | ||
72 | class BaggageRestrictionManager_getBaggageRestrictions_args { | |
73 | public: | |
74 | ||
75 | BaggageRestrictionManager_getBaggageRestrictions_args(const BaggageRestrictionManager_getBaggageRestrictions_args&); | |
76 | BaggageRestrictionManager_getBaggageRestrictions_args& operator=(const BaggageRestrictionManager_getBaggageRestrictions_args&); | |
77 | BaggageRestrictionManager_getBaggageRestrictions_args() : serviceName() { | |
78 | } | |
79 | ||
80 | virtual ~BaggageRestrictionManager_getBaggageRestrictions_args() throw(); | |
81 | std::string serviceName; | |
82 | ||
83 | _BaggageRestrictionManager_getBaggageRestrictions_args__isset __isset; | |
84 | ||
85 | void __set_serviceName(const std::string& val); | |
86 | ||
87 | bool operator == (const BaggageRestrictionManager_getBaggageRestrictions_args & rhs) const | |
88 | { | |
89 | if (!(serviceName == rhs.serviceName)) | |
90 | return false; | |
91 | return true; | |
92 | } | |
93 | bool operator != (const BaggageRestrictionManager_getBaggageRestrictions_args &rhs) const { | |
94 | return !(*this == rhs); | |
95 | } | |
96 | ||
97 | bool operator < (const BaggageRestrictionManager_getBaggageRestrictions_args & ) const; | |
98 | ||
99 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
100 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
101 | ||
102 | }; | |
103 | ||
104 | ||
105 | class BaggageRestrictionManager_getBaggageRestrictions_pargs { | |
106 | public: | |
107 | ||
108 | ||
109 | virtual ~BaggageRestrictionManager_getBaggageRestrictions_pargs() throw(); | |
110 | const std::string* serviceName; | |
111 | ||
112 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
113 | ||
114 | }; | |
115 | ||
116 | typedef struct _BaggageRestrictionManager_getBaggageRestrictions_result__isset { | |
117 | _BaggageRestrictionManager_getBaggageRestrictions_result__isset() : success(false) {} | |
118 | bool success :1; | |
119 | } _BaggageRestrictionManager_getBaggageRestrictions_result__isset; | |
120 | ||
121 | class BaggageRestrictionManager_getBaggageRestrictions_result { | |
122 | public: | |
123 | ||
124 | BaggageRestrictionManager_getBaggageRestrictions_result(const BaggageRestrictionManager_getBaggageRestrictions_result&); | |
125 | BaggageRestrictionManager_getBaggageRestrictions_result& operator=(const BaggageRestrictionManager_getBaggageRestrictions_result&); | |
126 | BaggageRestrictionManager_getBaggageRestrictions_result() { | |
127 | } | |
128 | ||
129 | virtual ~BaggageRestrictionManager_getBaggageRestrictions_result() throw(); | |
130 | std::vector<BaggageRestriction> success; | |
131 | ||
132 | _BaggageRestrictionManager_getBaggageRestrictions_result__isset __isset; | |
133 | ||
134 | void __set_success(const std::vector<BaggageRestriction> & val); | |
135 | ||
136 | bool operator == (const BaggageRestrictionManager_getBaggageRestrictions_result & rhs) const | |
137 | { | |
138 | if (!(success == rhs.success)) | |
139 | return false; | |
140 | return true; | |
141 | } | |
142 | bool operator != (const BaggageRestrictionManager_getBaggageRestrictions_result &rhs) const { | |
143 | return !(*this == rhs); | |
144 | } | |
145 | ||
146 | bool operator < (const BaggageRestrictionManager_getBaggageRestrictions_result & ) const; | |
147 | ||
148 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
149 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
150 | ||
151 | }; | |
152 | ||
153 | typedef struct _BaggageRestrictionManager_getBaggageRestrictions_presult__isset { | |
154 | _BaggageRestrictionManager_getBaggageRestrictions_presult__isset() : success(false) {} | |
155 | bool success :1; | |
156 | } _BaggageRestrictionManager_getBaggageRestrictions_presult__isset; | |
157 | ||
158 | class BaggageRestrictionManager_getBaggageRestrictions_presult { | |
159 | public: | |
160 | ||
161 | ||
162 | virtual ~BaggageRestrictionManager_getBaggageRestrictions_presult() throw(); | |
163 | std::vector<BaggageRestriction> * success; | |
164 | ||
165 | _BaggageRestrictionManager_getBaggageRestrictions_presult__isset __isset; | |
166 | ||
167 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
168 | ||
169 | }; | |
170 | ||
171 | class BaggageRestrictionManagerClient : virtual public BaggageRestrictionManagerIf { | |
172 | public: | |
173 | BaggageRestrictionManagerClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { | |
174 | setProtocol(prot); | |
175 | } | |
176 | BaggageRestrictionManagerClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { | |
177 | setProtocol(iprot,oprot); | |
178 | } | |
179 | private: | |
180 | void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { | |
181 | setProtocol(prot,prot); | |
182 | } | |
183 | void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { | |
184 | piprot_=iprot; | |
185 | poprot_=oprot; | |
186 | iprot_ = iprot.get(); | |
187 | oprot_ = oprot.get(); | |
188 | } | |
189 | public: | |
190 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { | |
191 | return piprot_; | |
192 | } | |
193 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { | |
194 | return poprot_; | |
195 | } | |
196 | void getBaggageRestrictions(std::vector<BaggageRestriction> & _return, const std::string& serviceName); | |
197 | void send_getBaggageRestrictions(const std::string& serviceName); | |
198 | void recv_getBaggageRestrictions(std::vector<BaggageRestriction> & _return); | |
199 | protected: | |
200 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; | |
201 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; | |
202 | ::apache::thrift::protocol::TProtocol* iprot_; | |
203 | ::apache::thrift::protocol::TProtocol* oprot_; | |
204 | }; | |
205 | ||
206 | class BaggageRestrictionManagerProcessor : public ::apache::thrift::TDispatchProcessor { | |
207 | protected: | |
208 | ::std::shared_ptr<BaggageRestrictionManagerIf> iface_; | |
209 | virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); | |
210 | private: | |
211 | typedef void (BaggageRestrictionManagerProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); | |
212 | typedef std::map<std::string, ProcessFunction> ProcessMap; | |
213 | ProcessMap processMap_; | |
214 | void process_getBaggageRestrictions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); | |
215 | public: | |
216 | BaggageRestrictionManagerProcessor(::std::shared_ptr<BaggageRestrictionManagerIf> iface) : | |
217 | iface_(iface) { | |
218 | processMap_["getBaggageRestrictions"] = &BaggageRestrictionManagerProcessor::process_getBaggageRestrictions; | |
219 | } | |
220 | ||
221 | virtual ~BaggageRestrictionManagerProcessor() {} | |
222 | }; | |
223 | ||
224 | class BaggageRestrictionManagerProcessorFactory : public ::apache::thrift::TProcessorFactory { | |
225 | public: | |
226 | BaggageRestrictionManagerProcessorFactory(const ::std::shared_ptr< BaggageRestrictionManagerIfFactory >& handlerFactory) : | |
227 | handlerFactory_(handlerFactory) {} | |
228 | ||
229 | ::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); | |
230 | ||
231 | protected: | |
232 | ::std::shared_ptr< BaggageRestrictionManagerIfFactory > handlerFactory_; | |
233 | }; | |
234 | ||
235 | class BaggageRestrictionManagerMultiface : virtual public BaggageRestrictionManagerIf { | |
236 | public: | |
237 | BaggageRestrictionManagerMultiface(std::vector<std::shared_ptr<BaggageRestrictionManagerIf> >& ifaces) : ifaces_(ifaces) { | |
238 | } | |
239 | virtual ~BaggageRestrictionManagerMultiface() {} | |
240 | protected: | |
241 | std::vector<std::shared_ptr<BaggageRestrictionManagerIf> > ifaces_; | |
242 | BaggageRestrictionManagerMultiface() {} | |
243 | void add(::std::shared_ptr<BaggageRestrictionManagerIf> iface) { | |
244 | ifaces_.push_back(iface); | |
245 | } | |
246 | public: | |
247 | void getBaggageRestrictions(std::vector<BaggageRestriction> & _return, const std::string& serviceName) { | |
248 | size_t sz = ifaces_.size(); | |
249 | size_t i = 0; | |
250 | for (; i < (sz - 1); ++i) { | |
251 | ifaces_[i]->getBaggageRestrictions(_return, serviceName); | |
252 | } | |
253 | ifaces_[i]->getBaggageRestrictions(_return, serviceName); | |
254 | return; | |
255 | } | |
256 | ||
257 | }; | |
258 | ||
259 | // The 'concurrent' client is a thread safe client that correctly handles | |
260 | // out of order responses. It is slower than the regular client, so should | |
261 | // only be used when you need to share a connection among multiple threads | |
262 | class BaggageRestrictionManagerConcurrentClient : virtual public BaggageRestrictionManagerIf { | |
263 | public: | |
264 | BaggageRestrictionManagerConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { | |
265 | setProtocol(prot); | |
266 | } | |
267 | BaggageRestrictionManagerConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { | |
268 | setProtocol(iprot,oprot); | |
269 | } | |
270 | private: | |
271 | void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { | |
272 | setProtocol(prot,prot); | |
273 | } | |
274 | void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { | |
275 | piprot_=iprot; | |
276 | poprot_=oprot; | |
277 | iprot_ = iprot.get(); | |
278 | oprot_ = oprot.get(); | |
279 | } | |
280 | public: | |
281 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { | |
282 | return piprot_; | |
283 | } | |
284 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { | |
285 | return poprot_; | |
286 | } | |
287 | void getBaggageRestrictions(std::vector<BaggageRestriction> & _return, const std::string& serviceName); | |
288 | int32_t send_getBaggageRestrictions(const std::string& serviceName); | |
289 | void recv_getBaggageRestrictions(std::vector<BaggageRestriction> & _return, const int32_t seqid); | |
290 | protected: | |
291 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; | |
292 | std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; | |
293 | ::apache::thrift::protocol::TProtocol* iprot_; | |
294 | ::apache::thrift::protocol::TProtocol* oprot_; | |
295 | ::apache::thrift::async::TConcurrentClientSyncInfo sync_; | |
296 | }; | |
297 | ||
298 | #ifdef _MSC_VER | |
299 | #pragma warning( pop ) | |
300 | #endif | |
301 | ||
302 | }} // namespace | |
303 | ||
304 | #endif |