IceStormInternal.cpp
Go to the documentation of this file.
1// **********************************************************************
2//
3// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
4//
5// This copy of Ice is licensed to you under the terms described in the
6// ICE_LICENSE file included in this distribution.
7//
8// **********************************************************************
9//
10// Ice version 3.7.0
11//
12// <auto-generated>
13//
14// Generated from file `IceStormInternal.ice'
15//
16// Warning: do not edit this file.
17//
18// </auto-generated>
19//
20
21#include <Ice/InputStream.h>
22#include <Ice/LocalException.h>
23#include <Ice/OutgoingAsync.h>
24#include <Ice/OutputStream.h>
25#include <Ice/ValueFactory.h>
27#include <IceUtil/PopDisableWarnings.h>
28#include <IceUtil/PushDisableWarnings.h>
29
30#if defined(_MSC_VER)
31#pragma warning(disable : 4458) // declaration of ... hides class member
32#elif defined(__clang__)
33#pragma clang diagnostic ignored "-Wshadow"
34#elif defined(__GNUC__)
35#pragma GCC diagnostic ignored "-Wshadow"
36#endif
37
38#ifndef ICE_IGNORE_VERSION
39#if ICE_INT_VERSION / 100 != 307
40#error Ice version mismatch!
41#endif
42#if ICE_INT_VERSION % 100 > 50
43#error Beta header file detected
44#endif
45#if ICE_INT_VERSION % 100 < 0
46#error Ice patch level mismatch!
47#endif
48#endif
49
50#ifdef ICE_CPP11_MAPPING // C++11 mapping
51
52namespace
53{
54
55 const ::std::string iceC_IceStorm_TopicLink_ids[2] = {"::Ice::Object", "::IceStorm::TopicLink"};
56 const ::std::string iceC_IceStorm_TopicLink_ops[] = {"forward",
57 "ice_id",
58 "ice_ids",
59 "ice_isA",
60 "ice_ping"};
61 const ::std::string iceC_IceStorm_TopicLink_forward_name = "forward";
62
63 const ::IceInternal::DefaultUserExceptionFactoryInit<::IceStorm::ReapWouldBlock>
64 iceC_IceStorm_ReapWouldBlock_init("::IceStorm::ReapWouldBlock");
65
66 const ::std::string iceC_IceStorm_TopicInternal_ids[3] = {"::Ice::Object",
67 "::IceStorm::Topic",
68 "::IceStorm::TopicInternal"};
69 const ::std::string iceC_IceStorm_TopicInternal_ops[] = {"destroy",
70 "getLinkInfoSeq",
71 "getLinkProxy",
72 "getName",
73 "getNonReplicatedPublisher",
74 "getPublisher",
75 "getSubscribers",
76 "ice_id",
77 "ice_ids",
78 "ice_isA",
79 "ice_ping",
80 "link",
81 "reap",
82 "subscribeAndGetPublisher",
83 "unlink",
84 "unsubscribe"};
85 const ::std::string iceC_IceStorm_TopicInternal_getLinkProxy_name = "getLinkProxy";
86 const ::std::string iceC_IceStorm_TopicInternal_reap_name = "reap";
87
88 const ::std::string iceC_IceStorm_TopicManagerInternal_ids[3] = {
89 "::Ice::Object",
90 "::IceStorm::TopicManager",
91 "::IceStorm::TopicManagerInternal"};
92 const ::std::string iceC_IceStorm_TopicManagerInternal_ops[] = {"create",
93 "getReplicaNode",
94 "getSliceChecksums",
95 "ice_id",
96 "ice_ids",
97 "ice_isA",
98 "ice_ping",
99 "retrieve",
100 "retrieveAll"};
101 const ::std::string iceC_IceStorm_TopicManagerInternal_getReplicaNode_name = "getReplicaNode";
102
103} // namespace
104
106{
107}
108
109const ::std::string&
110IceStorm::SendQueueSizeMaxReached::ice_staticId()
111{
112 static const ::std::string typeId = "::IceStorm::SendQueueSizeMaxReached";
113 return typeId;
114}
115
117{
118}
119
120const ::std::string&
121IceStorm::ReapWouldBlock::ice_staticId()
122{
123 static const ::std::string typeId = "::IceStorm::ReapWouldBlock";
124 return typeId;
125}
126
127bool
128IceStorm::TopicLink::ice_isA(::std::string s, const ::Ice::Current&) const
129{
130 return ::std::binary_search(iceC_IceStorm_TopicLink_ids, iceC_IceStorm_TopicLink_ids + 2, s);
131}
132
133::std::vector<::std::string>
134IceStorm::TopicLink::ice_ids(const ::Ice::Current&) const
135{
136 return ::std::vector<::std::string>(&iceC_IceStorm_TopicLink_ids[0],
137 &iceC_IceStorm_TopicLink_ids[2]);
138}
139
140::std::string
141IceStorm::TopicLink::ice_id(const ::Ice::Current&) const
142{
143 return ice_staticId();
144}
145
146const ::std::string&
148{
149 static const ::std::string typeId = "::IceStorm::TopicLink";
150 return typeId;
151}
152
153bool
154IceStorm::TopicLink::_iceD_forward(::IceInternal::Incoming& inS, const ::Ice::Current& current)
155{
156 _iceCheckMode(::Ice::OperationMode::Normal, current.mode);
157 auto istr = inS.startReadParams();
158 ::IceStorm::EventDataSeq iceP_events;
159 istr->readAll(iceP_events);
160 inS.endReadParams();
161 this->forward(::std::move(iceP_events), current);
162 inS.writeEmptyParams();
163 return true;
164}
165
166bool
167IceStorm::TopicLink::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
168{
169 ::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(
170 iceC_IceStorm_TopicLink_ops, iceC_IceStorm_TopicLink_ops + 5, current.operation);
171 if (r.first == r.second)
172 {
173 throw ::Ice::OperationNotExistException(
174 __FILE__, __LINE__, current.id, current.facet, current.operation);
175 }
176
177 switch (r.first - iceC_IceStorm_TopicLink_ops)
178 {
179 case 0:
180 {
181 return _iceD_forward(in, current);
182 }
183 case 1:
184 {
185 return _iceD_ice_id(in, current);
186 }
187 case 2:
188 {
189 return _iceD_ice_ids(in, current);
190 }
191 case 3:
192 {
193 return _iceD_ice_isA(in, current);
194 }
195 case 4:
196 {
197 return _iceD_ice_ping(in, current);
198 }
199 default:
200 {
201 assert(false);
202 throw ::Ice::OperationNotExistException(
203 __FILE__, __LINE__, current.id, current.facet, current.operation);
204 }
205 }
206}
207
208bool
209IceStorm::TopicInternal::ice_isA(::std::string s, const ::Ice::Current&) const
210{
211 return ::std::binary_search(
212 iceC_IceStorm_TopicInternal_ids, iceC_IceStorm_TopicInternal_ids + 3, s);
213}
214
215::std::vector<::std::string>
216IceStorm::TopicInternal::ice_ids(const ::Ice::Current&) const
217{
218 return ::std::vector<::std::string>(&iceC_IceStorm_TopicInternal_ids[0],
219 &iceC_IceStorm_TopicInternal_ids[3]);
220}
221
222::std::string
223IceStorm::TopicInternal::ice_id(const ::Ice::Current&) const
224{
225 return ice_staticId();
226}
227
228const ::std::string&
230{
231 static const ::std::string typeId = "::IceStorm::TopicInternal";
232 return typeId;
233}
234
235bool
236IceStorm::TopicInternal::_iceD_getLinkProxy(::IceInternal::Incoming& inS,
237 const ::Ice::Current& current)
238{
239 _iceCheckMode(::Ice::OperationMode::Idempotent, current.mode);
240 inS.readEmptyParams();
241 ::std::shared_ptr<::IceStorm::TopicLinkPrx> ret = this->getLinkProxy(current);
242 auto ostr = inS.startWriteParams();
243 ostr->writeAll(ret);
244 inS.endWriteParams();
245 return true;
246}
247
248bool
249IceStorm::TopicInternal::_iceD_reap(::IceInternal::Incoming& inS, const ::Ice::Current& current)
250{
251 _iceCheckMode(::Ice::OperationMode::Normal, current.mode);
252 auto istr = inS.startReadParams();
253 ::Ice::IdentitySeq iceP_id;
254 istr->readAll(iceP_id);
255 inS.endReadParams();
256 this->reap(::std::move(iceP_id), current);
257 inS.writeEmptyParams();
258 return true;
259}
260
261bool
262IceStorm::TopicInternal::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
263{
264 ::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(
265 iceC_IceStorm_TopicInternal_ops, iceC_IceStorm_TopicInternal_ops + 16, current.operation);
266 if (r.first == r.second)
267 {
268 throw ::Ice::OperationNotExistException(
269 __FILE__, __LINE__, current.id, current.facet, current.operation);
270 }
271
272 switch (r.first - iceC_IceStorm_TopicInternal_ops)
273 {
274 case 0:
275 {
276 return _iceD_destroy(in, current);
277 }
278 case 1:
279 {
280 return _iceD_getLinkInfoSeq(in, current);
281 }
282 case 2:
283 {
284 return _iceD_getLinkProxy(in, current);
285 }
286 case 3:
287 {
288 return _iceD_getName(in, current);
289 }
290 case 4:
291 {
292 return _iceD_getNonReplicatedPublisher(in, current);
293 }
294 case 5:
295 {
296 return _iceD_getPublisher(in, current);
297 }
298 case 6:
299 {
300 return _iceD_getSubscribers(in, current);
301 }
302 case 7:
303 {
304 return _iceD_ice_id(in, current);
305 }
306 case 8:
307 {
308 return _iceD_ice_ids(in, current);
309 }
310 case 9:
311 {
312 return _iceD_ice_isA(in, current);
313 }
314 case 10:
315 {
316 return _iceD_ice_ping(in, current);
317 }
318 case 11:
319 {
320 return _iceD_link(in, current);
321 }
322 case 12:
323 {
324 return _iceD_reap(in, current);
325 }
326 case 13:
327 {
328 return _iceD_subscribeAndGetPublisher(in, current);
329 }
330 case 14:
331 {
332 return _iceD_unlink(in, current);
333 }
334 case 15:
335 {
336 return _iceD_unsubscribe(in, current);
337 }
338 default:
339 {
340 assert(false);
341 throw ::Ice::OperationNotExistException(
342 __FILE__, __LINE__, current.id, current.facet, current.operation);
343 }
344 }
345}
346
347bool
348IceStorm::TopicManagerInternal::ice_isA(::std::string s, const ::Ice::Current&) const
349{
350 return ::std::binary_search(
351 iceC_IceStorm_TopicManagerInternal_ids, iceC_IceStorm_TopicManagerInternal_ids + 3, s);
352}
353
354::std::vector<::std::string>
355IceStorm::TopicManagerInternal::ice_ids(const ::Ice::Current&) const
356{
357 return ::std::vector<::std::string>(&iceC_IceStorm_TopicManagerInternal_ids[0],
358 &iceC_IceStorm_TopicManagerInternal_ids[3]);
359}
360
361::std::string
362IceStorm::TopicManagerInternal::ice_id(const ::Ice::Current&) const
363{
364 return ice_staticId();
365}
366
367const ::std::string&
369{
370 static const ::std::string typeId = "::IceStorm::TopicManagerInternal";
371 return typeId;
372}
373
374bool
376 const ::Ice::Current& current) const
377{
378 _iceCheckMode(::Ice::OperationMode::Idempotent, current.mode);
379 inS.readEmptyParams();
380 ::std::shared_ptr<::IceStormElection::NodePrx> ret = this->getReplicaNode(current);
381 auto ostr = inS.startWriteParams();
382 ostr->writeAll(ret);
383 inS.endWriteParams();
384 return true;
385}
386
387bool
388IceStorm::TopicManagerInternal::_iceDispatch(::IceInternal::Incoming& in,
389 const ::Ice::Current& current)
390{
391 ::std::pair<const ::std::string*, const ::std::string*> r =
392 ::std::equal_range(iceC_IceStorm_TopicManagerInternal_ops,
393 iceC_IceStorm_TopicManagerInternal_ops + 9,
394 current.operation);
395 if (r.first == r.second)
396 {
397 throw ::Ice::OperationNotExistException(
398 __FILE__, __LINE__, current.id, current.facet, current.operation);
399 }
400
401 switch (r.first - iceC_IceStorm_TopicManagerInternal_ops)
402 {
403 case 0:
404 {
405 return _iceD_create(in, current);
406 }
407 case 1:
408 {
409 return _iceD_getReplicaNode(in, current);
410 }
411 case 2:
412 {
413 return _iceD_getSliceChecksums(in, current);
414 }
415 case 3:
416 {
417 return _iceD_ice_id(in, current);
418 }
419 case 4:
420 {
421 return _iceD_ice_ids(in, current);
422 }
423 case 5:
424 {
425 return _iceD_ice_isA(in, current);
426 }
427 case 6:
428 {
429 return _iceD_ice_ping(in, current);
430 }
431 case 7:
432 {
433 return _iceD_retrieve(in, current);
434 }
435 case 8:
436 {
437 return _iceD_retrieveAll(in, current);
438 }
439 default:
440 {
441 assert(false);
442 throw ::Ice::OperationNotExistException(
443 __FILE__, __LINE__, current.id, current.facet, current.operation);
444 }
445 }
446}
447
448void
449IceStorm::TopicLinkPrx::_iceI_forward(
450 const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync,
451 const ::IceStorm::EventDataSeq& iceP_events,
452 const ::Ice::Context& context)
453{
454 outAsync->invoke(
455 iceC_IceStorm_TopicLink_forward_name,
456 ::Ice::OperationMode::Normal,
457 ::Ice::FormatType::DefaultFormat,
458 context,
459 [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_events); },
460 nullptr);
461}
462
463::std::shared_ptr<::Ice::ObjectPrx>
464IceStorm::TopicLinkPrx::_newInstance() const
465{
466 return ::IceInternal::createProxy<TopicLinkPrx>();
467}
468
469const ::std::string&
470IceStorm::TopicLinkPrx::ice_staticId()
471{
473}
474
475void
476IceStorm::TopicInternalPrx::_iceI_getLinkProxy(
477 const ::std::shared_ptr<
478 ::IceInternal::OutgoingAsyncT<::std::shared_ptr<::IceStorm::TopicLinkPrx>>>& outAsync,
479 const ::Ice::Context& context)
480{
481 _checkTwowayOnly(iceC_IceStorm_TopicInternal_getLinkProxy_name);
482 outAsync->invoke(iceC_IceStorm_TopicInternal_getLinkProxy_name,
483 ::Ice::OperationMode::Idempotent,
484 ::Ice::FormatType::DefaultFormat,
485 context,
486 nullptr,
487 nullptr);
488}
489
490void
491IceStorm::TopicInternalPrx::_iceI_reap(
492 const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync,
493 const ::Ice::IdentitySeq& iceP_id,
494 const ::Ice::Context& context)
495{
496 _checkTwowayOnly(iceC_IceStorm_TopicInternal_reap_name);
497 outAsync->invoke(
498 iceC_IceStorm_TopicInternal_reap_name,
499 ::Ice::OperationMode::Normal,
500 ::Ice::FormatType::DefaultFormat,
501 context,
502 [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_id); },
503 [](const ::Ice::UserException& ex)
504 {
505 try
506 {
507 ex.ice_throw();
508 }
509 catch (const ::IceStorm::ReapWouldBlock&)
510 {
511 throw;
512 }
513 catch (const ::Ice::UserException&)
514 {
515 }
516 });
517}
518
519::std::shared_ptr<::Ice::ObjectPrx>
520IceStorm::TopicInternalPrx::_newInstance() const
521{
522 return ::IceInternal::createProxy<TopicInternalPrx>();
523}
524
525const ::std::string&
526IceStorm::TopicInternalPrx::ice_staticId()
527{
529}
530
531void
532IceStorm::TopicManagerInternalPrx::_iceI_getReplicaNode(
533 const ::std::shared_ptr<
534 ::IceInternal::OutgoingAsyncT<::std::shared_ptr<::IceStormElection::NodePrx>>>& outAsync,
535 const ::Ice::Context& context)
536{
537 _checkTwowayOnly(iceC_IceStorm_TopicManagerInternal_getReplicaNode_name);
538 outAsync->invoke(iceC_IceStorm_TopicManagerInternal_getReplicaNode_name,
539 ::Ice::OperationMode::Idempotent,
540 ::Ice::FormatType::DefaultFormat,
541 context,
542 nullptr,
543 nullptr);
544}
545
546::std::shared_ptr<::Ice::ObjectPrx>
547IceStorm::TopicManagerInternalPrx::_newInstance() const
548{
549 return ::IceInternal::createProxy<TopicManagerInternalPrx>();
550}
551
552const ::std::string&
553IceStorm::TopicManagerInternalPrx::ice_staticId()
554{
556}
557
558namespace Ice
559{
560}
561
562#else // C++98 mapping
563
564namespace
565{
566
567 const ::std::string iceC_IceStorm_TopicLink_forward_name = "forward";
568
569 const ::std::string iceC_IceStorm_TopicInternal_getLinkProxy_name = "getLinkProxy";
570
571 const ::std::string iceC_IceStorm_TopicInternal_reap_name = "reap";
572
573 const ::std::string iceC_IceStorm_TopicManagerInternal_getReplicaNode_name = "getReplicaNode";
574
575} // namespace
576
578 ::Ice::LocalException(file_, line_)
579{
580}
581
585
586::std::string
588{
589 return "::IceStorm::SendQueueSizeMaxReached";
590}
591
597
598void
600{
601 throw *this;
602}
603
604namespace
605{
606
607 const ::IceInternal::DefaultUserExceptionFactoryInit<::IceStorm::ReapWouldBlock>
608 iceC_IceStorm_ReapWouldBlock_init("::IceStorm::ReapWouldBlock");
609
610}
611
615
616::std::string
618{
619 return "::IceStorm::ReapWouldBlock";
620}
621
624{
625 return new ReapWouldBlock(*this);
626}
627
628void
630{
631 throw *this;
632}
633
634void
635IceStorm::ReapWouldBlock::_writeImpl(::Ice::OutputStream* ostr) const
636{
637 ostr->startSlice("::IceStorm::ReapWouldBlock", -1, true);
638 Ice::StreamWriter<::IceStorm::ReapWouldBlock, ::Ice::OutputStream>::write(ostr, *this);
639 ostr->endSlice();
640}
641
642void
643IceStorm::ReapWouldBlock::_readImpl(::Ice::InputStream* istr)
644{
645 istr->startSlice();
646 Ice::StreamReader<::IceStorm::ReapWouldBlock, ::Ice::InputStream>::read(istr, *this);
647 istr->endSlice();
648}
649
651{
652 return p;
653}
654
655void ::IceProxy::IceStorm::_readProxy(
656 ::Ice::InputStream* istr,
658{
659 ::Ice::ObjectPrx proxy;
660 istr->read(proxy);
661 if (!proxy)
662 {
663 v = 0;
664 }
665 else
666 {
667 v = new ::IceProxy::IceStorm::TopicLink;
668 v->_copyFrom(proxy);
669 }
670}
671
672::Ice::AsyncResultPtr
673IceProxy::IceStorm::TopicLink::_iceI_begin_forward(const ::IceStorm::EventDataSeq& iceP_events,
674 const ::Ice::Context& context,
675 const ::IceInternal::CallbackBasePtr& del,
676 const ::Ice::LocalObjectPtr& cookie,
677 bool sync)
678{
679 ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(
680 this, iceC_IceStorm_TopicLink_forward_name, del, cookie, sync);
681 try
682 {
683 result->prepare(iceC_IceStorm_TopicLink_forward_name, ::Ice::Normal, context);
684 ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
685 ostr->write(iceP_events);
686 result->endWriteParams();
687 result->invoke(iceC_IceStorm_TopicLink_forward_name);
688 }
689 catch (const ::Ice::Exception& ex)
690 {
691 result->abort(ex);
692 }
693 return result;
694}
695
696void
697IceProxy::IceStorm::TopicLink::end_forward(const ::Ice::AsyncResultPtr& result)
698{
699 _end(result, iceC_IceStorm_TopicLink_forward_name);
700}
701
702::IceProxy::Ice::Object*
707
708const ::std::string&
710{
711 return ::IceStorm::TopicLink::ice_staticId();
712}
713
715{
716 return p;
717}
718
719void ::IceProxy::IceStorm::_readProxy(
720 ::Ice::InputStream* istr,
722{
723 ::Ice::ObjectPrx proxy;
724 istr->read(proxy);
725 if (!proxy)
726 {
727 v = 0;
728 }
729 else
730 {
731 v = new ::IceProxy::IceStorm::TopicInternal;
732 v->_copyFrom(proxy);
733 }
734}
735
736::Ice::AsyncResultPtr
737IceProxy::IceStorm::TopicInternal::_iceI_begin_getLinkProxy(
738 const ::Ice::Context& context,
739 const ::IceInternal::CallbackBasePtr& del,
740 const ::Ice::LocalObjectPtr& cookie,
741 bool sync)
742{
743 _checkTwowayOnly(iceC_IceStorm_TopicInternal_getLinkProxy_name, sync);
744 ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(
745 this, iceC_IceStorm_TopicInternal_getLinkProxy_name, del, cookie, sync);
746 try
747 {
748 result->prepare(iceC_IceStorm_TopicInternal_getLinkProxy_name, ::Ice::Idempotent, context);
749 result->writeEmptyParams();
750 result->invoke(iceC_IceStorm_TopicInternal_getLinkProxy_name);
751 }
752 catch (const ::Ice::Exception& ex)
753 {
754 result->abort(ex);
755 }
756 return result;
757}
758
760IceProxy::IceStorm::TopicInternal::end_getLinkProxy(const ::Ice::AsyncResultPtr& result)
761{
762 ::Ice::AsyncResult::_check(result, this, iceC_IceStorm_TopicInternal_getLinkProxy_name);
764 if (!result->_waitForResponse())
765 {
766 try
767 {
768 result->_throwUserException();
769 }
770 catch (const ::Ice::UserException& ex)
771 {
772 throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());
773 }
774 }
775 ::Ice::InputStream* istr = result->_startReadParams();
776 istr->read(ret);
777 result->_endReadParams();
778 return ret;
779}
780
781::Ice::AsyncResultPtr
782IceProxy::IceStorm::TopicInternal::_iceI_begin_reap(const ::Ice::IdentitySeq& iceP_id,
783 const ::Ice::Context& context,
784 const ::IceInternal::CallbackBasePtr& del,
785 const ::Ice::LocalObjectPtr& cookie,
786 bool sync)
787{
788 _checkTwowayOnly(iceC_IceStorm_TopicInternal_reap_name, sync);
789 ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(
790 this, iceC_IceStorm_TopicInternal_reap_name, del, cookie, sync);
791 try
792 {
793 result->prepare(iceC_IceStorm_TopicInternal_reap_name, ::Ice::Normal, context);
794 ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
795 ostr->write(iceP_id);
796 result->endWriteParams();
797 result->invoke(iceC_IceStorm_TopicInternal_reap_name);
798 }
799 catch (const ::Ice::Exception& ex)
800 {
801 result->abort(ex);
802 }
803 return result;
804}
805
806void
807IceProxy::IceStorm::TopicInternal::end_reap(const ::Ice::AsyncResultPtr& result)
808{
809 ::Ice::AsyncResult::_check(result, this, iceC_IceStorm_TopicInternal_reap_name);
810 if (!result->_waitForResponse())
811 {
812 try
813 {
814 result->_throwUserException();
815 }
816 catch (const ::IceStorm::ReapWouldBlock&)
817 {
818 throw;
819 }
820 catch (const ::Ice::UserException& ex)
821 {
822 throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());
823 }
824 }
825 result->_readEmptyParams();
826}
827
828::IceProxy::Ice::Object*
833
834const ::std::string&
836{
837 return ::IceStorm::TopicInternal::ice_staticId();
838}
839
841{
842 return p;
843}
844
845void ::IceProxy::IceStorm::_readProxy(
846 ::Ice::InputStream* istr,
848{
849 ::Ice::ObjectPrx proxy;
850 istr->read(proxy);
851 if (!proxy)
852 {
853 v = 0;
854 }
855 else
856 {
857 v = new ::IceProxy::IceStorm::TopicManagerInternal;
858 v->_copyFrom(proxy);
859 }
860}
861
862::Ice::AsyncResultPtr
863IceProxy::IceStorm::TopicManagerInternal::_iceI_begin_getReplicaNode(
864 const ::Ice::Context& context,
865 const ::IceInternal::CallbackBasePtr& del,
866 const ::Ice::LocalObjectPtr& cookie,
867 bool sync)
868{
869 _checkTwowayOnly(iceC_IceStorm_TopicManagerInternal_getReplicaNode_name, sync);
870 ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(
871 this, iceC_IceStorm_TopicManagerInternal_getReplicaNode_name, del, cookie, sync);
872 try
873 {
874 result->prepare(
875 iceC_IceStorm_TopicManagerInternal_getReplicaNode_name, ::Ice::Idempotent, context);
876 result->writeEmptyParams();
877 result->invoke(iceC_IceStorm_TopicManagerInternal_getReplicaNode_name);
878 }
879 catch (const ::Ice::Exception& ex)
880 {
881 result->abort(ex);
882 }
883 return result;
884}
885
888{
889 ::Ice::AsyncResult::_check(
890 result, this, iceC_IceStorm_TopicManagerInternal_getReplicaNode_name);
892 if (!result->_waitForResponse())
893 {
894 try
895 {
896 result->_throwUserException();
897 }
898 catch (const ::Ice::UserException& ex)
899 {
900 throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());
901 }
902 }
903 ::Ice::InputStream* istr = result->_startReadParams();
904 istr->read(ret);
905 result->_endReadParams();
906 return ret;
907}
908
909::IceProxy::Ice::Object*
914
915const ::std::string&
917{
918 return ::IceStorm::TopicManagerInternal::ice_staticId();
919}
920
924
925::Ice::Object*
927{
928 return p;
929}
930
931namespace
932{
933 const ::std::string iceC_IceStorm_TopicLink_ids[2] = {"::Ice::Object", "::IceStorm::TopicLink"};
934
935}
936
937bool
938IceStorm::TopicLink::ice_isA(const ::std::string& s, const ::Ice::Current&) const
939{
940 return ::std::binary_search(iceC_IceStorm_TopicLink_ids, iceC_IceStorm_TopicLink_ids + 2, s);
941}
942
943::std::vector<::std::string>
944IceStorm::TopicLink::ice_ids(const ::Ice::Current&) const
945{
946 return ::std::vector<::std::string>(&iceC_IceStorm_TopicLink_ids[0],
947 &iceC_IceStorm_TopicLink_ids[2]);
948}
949
950const ::std::string&
951IceStorm::TopicLink::ice_id(const ::Ice::Current&) const
952{
953 return ice_staticId();
954}
955
956const ::std::string&
958{
959#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
960 static const ::std::string typeId = "::IceStorm::TopicLink";
961 return typeId;
962#else
963 return iceC_IceStorm_TopicLink_ids[1];
964#endif
965}
966
967bool
968IceStorm::TopicLink::_iceD_forward(::IceInternal::Incoming& inS, const ::Ice::Current& current)
969{
970 _iceCheckMode(::Ice::Normal, current.mode);
971 ::Ice::InputStream* istr = inS.startReadParams();
972 ::IceStorm::EventDataSeq iceP_events;
973 istr->read(iceP_events);
974 inS.endReadParams();
975 this->forward(iceP_events, current);
976 inS.writeEmptyParams();
977 return true;
978}
979
980namespace
981{
982 const ::std::string iceC_IceStorm_TopicLink_all[] = {"forward",
983 "ice_id",
984 "ice_ids",
985 "ice_isA",
986 "ice_ping"};
987
988}
989
990bool
991IceStorm::TopicLink::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
992{
993 ::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(
994 iceC_IceStorm_TopicLink_all, iceC_IceStorm_TopicLink_all + 5, current.operation);
995 if (r.first == r.second)
996 {
997 throw ::Ice::OperationNotExistException(
998 __FILE__, __LINE__, current.id, current.facet, current.operation);
999 }
1000
1001 switch (r.first - iceC_IceStorm_TopicLink_all)
1002 {
1003 case 0:
1004 {
1005 return _iceD_forward(in, current);
1006 }
1007 case 1:
1008 {
1009 return _iceD_ice_id(in, current);
1010 }
1011 case 2:
1012 {
1013 return _iceD_ice_ids(in, current);
1014 }
1015 case 3:
1016 {
1017 return _iceD_ice_isA(in, current);
1018 }
1019 case 4:
1020 {
1021 return _iceD_ice_ping(in, current);
1022 }
1023 default:
1024 {
1025 assert(false);
1026 throw ::Ice::OperationNotExistException(
1027 __FILE__, __LINE__, current.id, current.facet, current.operation);
1028 }
1029 }
1030}
1031
1032void
1033IceStorm::TopicLink::_iceWriteImpl(::Ice::OutputStream* ostr) const
1034{
1035 ostr->startSlice(ice_staticId(), -1, true);
1036 Ice::StreamWriter<::IceStorm::TopicLink, ::Ice::OutputStream>::write(ostr, *this);
1037 ostr->endSlice();
1038}
1039
1040void
1041IceStorm::TopicLink::_iceReadImpl(::Ice::InputStream* istr)
1042{
1043 istr->startSlice();
1044 Ice::StreamReader<::IceStorm::TopicLink, ::Ice::InputStream>::read(istr, *this);
1045 istr->endSlice();
1046}
1047
1048void
1049IceStorm::_icePatchObjectPtr(TopicLinkPtr& handle, const ::Ice::ObjectPtr& v)
1050{
1051 handle = ::IceStorm::TopicLinkPtr::dynamicCast(v);
1052 if (v && !handle)
1053 {
1054 IceInternal::Ex::throwUOE(::IceStorm::TopicLink::ice_staticId(), v);
1055 }
1056}
1057
1061
1062::Ice::Object*
1064{
1065 return p;
1066}
1067
1068namespace
1069{
1070 const ::std::string iceC_IceStorm_TopicInternal_ids[3] = {"::Ice::Object",
1071 "::IceStorm::Topic",
1072 "::IceStorm::TopicInternal"};
1073
1074}
1075
1076bool
1077IceStorm::TopicInternal::ice_isA(const ::std::string& s, const ::Ice::Current&) const
1078{
1079 return ::std::binary_search(
1080 iceC_IceStorm_TopicInternal_ids, iceC_IceStorm_TopicInternal_ids + 3, s);
1081}
1082
1083::std::vector<::std::string>
1084IceStorm::TopicInternal::ice_ids(const ::Ice::Current&) const
1085{
1086 return ::std::vector<::std::string>(&iceC_IceStorm_TopicInternal_ids[0],
1087 &iceC_IceStorm_TopicInternal_ids[3]);
1088}
1089
1090const ::std::string&
1091IceStorm::TopicInternal::ice_id(const ::Ice::Current&) const
1092{
1093 return ice_staticId();
1094}
1095
1096const ::std::string&
1098{
1099#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
1100 static const ::std::string typeId = "::IceStorm::TopicInternal";
1101 return typeId;
1102#else
1103 return iceC_IceStorm_TopicInternal_ids[2];
1104#endif
1105}
1106
1107bool
1109 const ::Ice::Current& current)
1110{
1111 _iceCheckMode(::Ice::Idempotent, current.mode);
1112 inS.readEmptyParams();
1113 ::IceStorm::TopicLinkPrx ret = this->getLinkProxy(current);
1114 ::Ice::OutputStream* ostr = inS.startWriteParams();
1115 ostr->write(ret);
1116 inS.endWriteParams();
1117 return true;
1118}
1119
1120bool
1121IceStorm::TopicInternal::_iceD_reap(::IceInternal::Incoming& inS, const ::Ice::Current& current)
1122{
1123 _iceCheckMode(::Ice::Normal, current.mode);
1124 ::Ice::InputStream* istr = inS.startReadParams();
1125 ::Ice::IdentitySeq iceP_id;
1126 istr->read(iceP_id);
1127 inS.endReadParams();
1128 this->reap(iceP_id, current);
1129 inS.writeEmptyParams();
1130 return true;
1131}
1132
1133namespace
1134{
1135 const ::std::string iceC_IceStorm_TopicInternal_all[] = {"destroy",
1136 "getLinkInfoSeq",
1137 "getLinkProxy",
1138 "getName",
1139 "getNonReplicatedPublisher",
1140 "getPublisher",
1141 "getSubscribers",
1142 "ice_id",
1143 "ice_ids",
1144 "ice_isA",
1145 "ice_ping",
1146 "link",
1147 "reap",
1148 "subscribeAndGetPublisher",
1149 "unlink",
1150 "unsubscribe"};
1151
1152}
1153
1154bool
1155IceStorm::TopicInternal::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
1156{
1157 ::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(
1158 iceC_IceStorm_TopicInternal_all, iceC_IceStorm_TopicInternal_all + 16, current.operation);
1159 if (r.first == r.second)
1160 {
1161 throw ::Ice::OperationNotExistException(
1162 __FILE__, __LINE__, current.id, current.facet, current.operation);
1163 }
1164
1165 switch (r.first - iceC_IceStorm_TopicInternal_all)
1166 {
1167 case 0:
1168 {
1169 return _iceD_destroy(in, current);
1170 }
1171 case 1:
1172 {
1173 return _iceD_getLinkInfoSeq(in, current);
1174 }
1175 case 2:
1176 {
1177 return _iceD_getLinkProxy(in, current);
1178 }
1179 case 3:
1180 {
1181 return _iceD_getName(in, current);
1182 }
1183 case 4:
1184 {
1185 return _iceD_getNonReplicatedPublisher(in, current);
1186 }
1187 case 5:
1188 {
1189 return _iceD_getPublisher(in, current);
1190 }
1191 case 6:
1192 {
1193 return _iceD_getSubscribers(in, current);
1194 }
1195 case 7:
1196 {
1197 return _iceD_ice_id(in, current);
1198 }
1199 case 8:
1200 {
1201 return _iceD_ice_ids(in, current);
1202 }
1203 case 9:
1204 {
1205 return _iceD_ice_isA(in, current);
1206 }
1207 case 10:
1208 {
1209 return _iceD_ice_ping(in, current);
1210 }
1211 case 11:
1212 {
1213 return _iceD_link(in, current);
1214 }
1215 case 12:
1216 {
1217 return _iceD_reap(in, current);
1218 }
1219 case 13:
1220 {
1221 return _iceD_subscribeAndGetPublisher(in, current);
1222 }
1223 case 14:
1224 {
1225 return _iceD_unlink(in, current);
1226 }
1227 case 15:
1228 {
1229 return _iceD_unsubscribe(in, current);
1230 }
1231 default:
1232 {
1233 assert(false);
1234 throw ::Ice::OperationNotExistException(
1235 __FILE__, __LINE__, current.id, current.facet, current.operation);
1236 }
1237 }
1238}
1239
1240void
1241IceStorm::TopicInternal::_iceWriteImpl(::Ice::OutputStream* ostr) const
1242{
1243 ostr->startSlice(ice_staticId(), -1, true);
1244 Ice::StreamWriter<::IceStorm::TopicInternal, ::Ice::OutputStream>::write(ostr, *this);
1245 ostr->endSlice();
1246}
1247
1248void
1250{
1251 istr->startSlice();
1252 Ice::StreamReader<::IceStorm::TopicInternal, ::Ice::InputStream>::read(istr, *this);
1253 istr->endSlice();
1254}
1255
1256void
1257IceStorm::_icePatchObjectPtr(TopicInternalPtr& handle, const ::Ice::ObjectPtr& v)
1258{
1259 handle = ::IceStorm::TopicInternalPtr::dynamicCast(v);
1260 if (v && !handle)
1261 {
1262 IceInternal::Ex::throwUOE(::IceStorm::TopicInternal::ice_staticId(), v);
1263 }
1264}
1265
1269
1270::Ice::Object*
1275
1276namespace
1277{
1278 const ::std::string iceC_IceStorm_TopicManagerInternal_ids[3] = {
1279 "::Ice::Object",
1280 "::IceStorm::TopicManager",
1281 "::IceStorm::TopicManagerInternal"};
1282
1283}
1284
1285bool
1286IceStorm::TopicManagerInternal::ice_isA(const ::std::string& s, const ::Ice::Current&) const
1287{
1288 return ::std::binary_search(
1289 iceC_IceStorm_TopicManagerInternal_ids, iceC_IceStorm_TopicManagerInternal_ids + 3, s);
1290}
1291
1292::std::vector<::std::string>
1294{
1295 return ::std::vector<::std::string>(&iceC_IceStorm_TopicManagerInternal_ids[0],
1296 &iceC_IceStorm_TopicManagerInternal_ids[3]);
1297}
1298
1299const ::std::string&
1300IceStorm::TopicManagerInternal::ice_id(const ::Ice::Current&) const
1301{
1302 return ice_staticId();
1303}
1304
1305const ::std::string&
1307{
1308#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
1309 static const ::std::string typeId = "::IceStorm::TopicManagerInternal";
1310 return typeId;
1311#else
1312 return iceC_IceStorm_TopicManagerInternal_ids[2];
1313#endif
1314}
1315
1316bool
1318 const ::Ice::Current& current) const
1319{
1320 _iceCheckMode(::Ice::Idempotent, current.mode);
1321 inS.readEmptyParams();
1322 ::IceStormElection::NodePrx ret = this->getReplicaNode(current);
1323 ::Ice::OutputStream* ostr = inS.startWriteParams();
1324 ostr->write(ret);
1325 inS.endWriteParams();
1326 return true;
1327}
1328
1329namespace
1330{
1331 const ::std::string iceC_IceStorm_TopicManagerInternal_all[] = {"create",
1332 "getReplicaNode",
1333 "getSliceChecksums",
1334 "ice_id",
1335 "ice_ids",
1336 "ice_isA",
1337 "ice_ping",
1338 "retrieve",
1339 "retrieveAll"};
1340
1341}
1342
1343bool
1345 const ::Ice::Current& current)
1346{
1347 ::std::pair<const ::std::string*, const ::std::string*> r =
1348 ::std::equal_range(iceC_IceStorm_TopicManagerInternal_all,
1349 iceC_IceStorm_TopicManagerInternal_all + 9,
1350 current.operation);
1351 if (r.first == r.second)
1352 {
1353 throw ::Ice::OperationNotExistException(
1354 __FILE__, __LINE__, current.id, current.facet, current.operation);
1355 }
1356
1357 switch (r.first - iceC_IceStorm_TopicManagerInternal_all)
1358 {
1359 case 0:
1360 {
1361 return _iceD_create(in, current);
1362 }
1363 case 1:
1364 {
1365 return _iceD_getReplicaNode(in, current);
1366 }
1367 case 2:
1368 {
1369 return _iceD_getSliceChecksums(in, current);
1370 }
1371 case 3:
1372 {
1373 return _iceD_ice_id(in, current);
1374 }
1375 case 4:
1376 {
1377 return _iceD_ice_ids(in, current);
1378 }
1379 case 5:
1380 {
1381 return _iceD_ice_isA(in, current);
1382 }
1383 case 6:
1384 {
1385 return _iceD_ice_ping(in, current);
1386 }
1387 case 7:
1388 {
1389 return _iceD_retrieve(in, current);
1390 }
1391 case 8:
1392 {
1393 return _iceD_retrieveAll(in, current);
1394 }
1395 default:
1396 {
1397 assert(false);
1398 throw ::Ice::OperationNotExistException(
1399 __FILE__, __LINE__, current.id, current.facet, current.operation);
1400 }
1401 }
1402}
1403
1404void
1406{
1407 ostr->startSlice(ice_staticId(), -1, true);
1408 Ice::StreamWriter<::IceStorm::TopicManagerInternal, ::Ice::OutputStream>::write(ostr, *this);
1409 ostr->endSlice();
1410}
1411
1412void
1414{
1415 istr->startSlice();
1416 Ice::StreamReader<::IceStorm::TopicManagerInternal, ::Ice::InputStream>::read(istr, *this);
1417 istr->endSlice();
1418}
1419
1420void
1422{
1423 handle = ::IceStorm::TopicManagerInternalPtr::dynamicCast(v);
1424 if (v && !handle)
1425 {
1426 IceInternal::Ex::throwUOE(::IceStorm::TopicManagerInternal::ice_staticId(), v);
1427 }
1428}
1429
1430namespace Ice
1431{
1432}
1433
1434#endif
::IceStorm::TopicLinkPrx end_getLinkProxy(const ::Ice::AsyncResultPtr &)
virtual::IceProxy::Ice::Object * _newInstance() const
void end_reap(const ::Ice::AsyncResultPtr &)
static const ::std::string & ice_staticId()
::IceStormElection::NodePrx end_getReplicaNode(const ::Ice::AsyncResultPtr &)
virtual::IceProxy::Ice::Object * _newInstance() const
static const ::std::string & ice_staticId()
Thrown if the reap call would block.
virtual::std::string ice_id() const
virtual ReapWouldBlock * ice_clone() const
virtual void _writeImpl(::Ice::OutputStream *) const
virtual void ice_throw() const
virtual void _readImpl(::Ice::InputStream *)
virtual::std::string ice_id() const
virtual SendQueueSizeMaxReached * ice_clone() const
Internal operations for a topic.
bool _iceD_reap(::IceInternal::Incoming &, const ::Ice::Current &)
virtual const ::std::string & ice_id(const ::Ice::Current &=::Ice::emptyCurrent) const
virtual bool _iceDispatch(::IceInternal::Incoming &, const ::Ice::Current &)
virtual void reap(const ::Ice::IdentitySeq &, const ::Ice::Current &=::Ice::emptyCurrent)=0
virtual void _iceWriteImpl(::Ice::OutputStream *) const
virtual::IceStorm::TopicLinkPrx getLinkProxy(const ::Ice::Current &=::Ice::emptyCurrent)=0
virtual ::std::vector<::std::string > ice_ids(const ::Ice::Current &=::Ice::emptyCurrent) const
virtual void _iceReadImpl(::Ice::InputStream *)
bool _iceD_getLinkProxy(::IceInternal::Incoming &, const ::Ice::Current &)
virtual bool ice_isA(const ::std::string &, const ::Ice::Current &=::Ice::emptyCurrent) const
static const ::std::string & ice_staticId()
Internal operations for a topic manager.
virtual const ::std::string & ice_id(const ::Ice::Current &=::Ice::emptyCurrent) const
virtual bool _iceDispatch(::IceInternal::Incoming &, const ::Ice::Current &)
virtual void _iceWriteImpl(::Ice::OutputStream *) const
bool _iceD_getReplicaNode(::IceInternal::Incoming &, const ::Ice::Current &) const
virtual ::std::vector<::std::string > ice_ids(const ::Ice::Current &=::Ice::emptyCurrent) const
virtual void _iceReadImpl(::Ice::InputStream *)
virtual::IceStormElection::NodePrx getReplicaNode(const ::Ice::Current &=::Ice::emptyCurrent) const =0
virtual bool ice_isA(const ::std::string &, const ::Ice::Current &=::Ice::emptyCurrent) const
static const ::std::string & ice_staticId()
::IceProxy::Ice::Object * upCast(::IceProxy::IceStorm::TopicLink *)
::IceInternal::ProxyHandle<::IceProxy::IceStormElection::Node > NodePrx
Definition Election.h:1210
void _icePatchObjectPtr(TopicLinkPtr &, const ::Ice::ObjectPtr &)
::IceInternal::Handle<::IceStorm::TopicManagerInternal > TopicManagerInternalPtr
::IceInternal::Handle<::IceStorm::TopicLink > TopicLinkPtr
std::deque<::IceStorm::EventDataPtr > EventDataSeq
A sequence of EventData.
::IceInternal::Handle<::IceStorm::TopicInternal > TopicInternalPtr
::Ice::Object * upCast(::IceStorm::TopicLink *)
::IceInternal::ProxyHandle<::IceProxy::IceStorm::TopicLink > TopicLinkPrx