Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
Session.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4//
5// Ice version 3.7.11
6//
7// <auto-generated>
8//
9// Generated from file `Session.ice'
10//
11// Warning: do not edit this file.
12//
13// </auto-generated>
14//
15
16#ifndef __IceGrid_Session_h__
17#define __IceGrid_Session_h__
18
20#include <Ice/ProxyF.h>
21#include <Ice/ObjectF.h>
22#include <Ice/ValueF.h>
23#include <Ice/Exception.h>
24#include <Ice/LocalObject.h>
25#include <Ice/StreamHelpers.h>
26#include <Ice/Comparable.h>
27#include <Ice/Proxy.h>
28#include <Ice/Object.h>
29#include <Ice/GCObject.h>
30#include <Ice/Value.h>
31#include <Ice/Incoming.h>
32#include <Ice/IncomingAsync.h>
34#include <IceUtil/ScopedArray.h>
35#include <Ice/Optional.h>
37#include <Ice/SlicedDataF.h>
38#include <Glacier2/Session.h>
39#include <IceGrid/Exception.h>
41#include <IceGrid/Config.h>
42
43#ifndef ICE_IGNORE_VERSION
44# if ICE_INT_VERSION / 100 != 307
45# error Ice version mismatch!
46# endif
47# if ICE_INT_VERSION % 100 >= 50
48# error Beta header file detected
49# endif
50# if ICE_INT_VERSION % 100 < 11
51# error Ice patch level mismatch!
52# endif
53#endif
54
55#ifndef ICEGRID_API
56# if defined(ICE_STATIC_LIBS)
57# define ICEGRID_API /**/
58# elif defined(ICEGRID_API_EXPORTS)
59# define ICEGRID_API ICE_DECLSPEC_EXPORT
60# else
61# define ICEGRID_API ICE_DECLSPEC_IMPORT
62# endif
63#endif
64
65#ifdef ICE_CPP11_MAPPING // C++11 mapping
66
67namespace IceGrid
68{
69
70class Session;
71class SessionPrx;
72
73}
74
75namespace IceGrid
76{
77
87{
88public:
89
91
98 virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override;
99
105 virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override;
106
112 virtual ::std::string ice_id(const ::Ice::Current& current) const override;
113
118 static const ::std::string& ice_staticId();
119
126 virtual void keepAlive(const ::Ice::Current& current) = 0;
128 bool _iceD_keepAlive(::IceInternal::Incoming&, const ::Ice::Current&);
130
146 virtual void allocateObjectByIdAsync(::Ice::Identity id, ::std::function<void(const ::std::shared_ptr<::Ice::ObjectPrx>& returnValue)> response, ::std::function<void(::std::exception_ptr)> exception, const ::Ice::Current& current) = 0;
148 bool _iceD_allocateObjectById(::IceInternal::Incoming&, const ::Ice::Current&);
150
163 virtual void allocateObjectByTypeAsync(::std::string type, ::std::function<void(const ::std::shared_ptr<::Ice::ObjectPrx>& returnValue)> response, ::std::function<void(::std::exception_ptr)> exception, const ::Ice::Current& current) = 0;
165 bool _iceD_allocateObjectByType(::IceInternal::Incoming&, const ::Ice::Current&);
167
179 virtual void releaseObject(::Ice::Identity id, const ::Ice::Current& current) = 0;
181 bool _iceD_releaseObject(::IceInternal::Incoming&, const ::Ice::Current&);
183
192 virtual void setAllocationTimeout(int timeout, const ::Ice::Current& current) = 0;
194 bool _iceD_setAllocationTimeout(::IceInternal::Incoming&, const ::Ice::Current&);
196
198 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
200};
201
202}
203
204namespace IceGrid
205{
206
215class ICE_CLASS(ICEGRID_API) SessionPrx : public virtual ::Ice::Proxy<SessionPrx, ::Glacier2::SessionPrx>
216{
217public:
218
225 void keepAlive(const ::Ice::Context& context = ::Ice::noExplicitContext)
226 {
227 _makePromiseOutgoing<void>(true, this, &SessionPrx::_iceI_keepAlive, context).get();
228 }
229
237 template<template<typename> class P = ::std::promise>
238 auto keepAliveAsync(const ::Ice::Context& context = ::Ice::noExplicitContext)
239 -> decltype(::std::declval<P<void>>().get_future())
240 {
241 return _makePromiseOutgoing<void, P>(false, this, &SessionPrx::_iceI_keepAlive, context);
242 }
243
254 ::std::function<void()>
255 keepAliveAsync(::std::function<void()> response,
256 ::std::function<void(::std::exception_ptr)> ex = nullptr,
257 ::std::function<void(bool)> sent = nullptr,
258 const ::Ice::Context& context = ::Ice::noExplicitContext)
259 {
260 return _makeLambdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_keepAlive, context);
261 }
262
264 ICE_MEMBER(ICEGRID_API) void _iceI_keepAlive(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Context&);
266
281 ::std::shared_ptr<::Ice::ObjectPrx> allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
282 {
283 return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(true, this, &SessionPrx::_iceI_allocateObjectById, id, context).get();
284 }
285
296 template<template<typename> class P = ::std::promise>
297 auto allocateObjectByIdAsync(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
298 -> decltype(::std::declval<P<::std::shared_ptr<::Ice::ObjectPrx>>>().get_future())
299 {
300 return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>, P>(false, this, &SessionPrx::_iceI_allocateObjectById, id, context);
301 }
302
316 ::std::function<void()>
317 allocateObjectByIdAsync(const ::Ice::Identity& id,
318 ::std::function<void(::std::shared_ptr<::Ice::ObjectPrx>)> response,
319 ::std::function<void(::std::exception_ptr)> ex = nullptr,
320 ::std::function<void(bool)> sent = nullptr,
321 const ::Ice::Context& context = ::Ice::noExplicitContext)
322 {
323 return _makeLambdaOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_allocateObjectById, id, context);
324 }
325
327 ICE_MEMBER(ICEGRID_API) void _iceI_allocateObjectById(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::shared_ptr<::Ice::ObjectPrx>>>&, const ::Ice::Identity&, const ::Ice::Context&);
329
341 ::std::shared_ptr<::Ice::ObjectPrx> allocateObjectByType(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
342 {
343 return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(true, this, &SessionPrx::_iceI_allocateObjectByType, type, context).get();
344 }
345
356 template<template<typename> class P = ::std::promise>
357 auto allocateObjectByTypeAsync(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
358 -> decltype(::std::declval<P<::std::shared_ptr<::Ice::ObjectPrx>>>().get_future())
359 {
360 return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>, P>(false, this, &SessionPrx::_iceI_allocateObjectByType, type, context);
361 }
362
376 ::std::function<void()>
377 allocateObjectByTypeAsync(const ::std::string& type,
378 ::std::function<void(::std::shared_ptr<::Ice::ObjectPrx>)> response,
379 ::std::function<void(::std::exception_ptr)> ex = nullptr,
380 ::std::function<void(bool)> sent = nullptr,
381 const ::Ice::Context& context = ::Ice::noExplicitContext)
382 {
383 return _makeLambdaOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_allocateObjectByType, type, context);
384 }
385
387 ICE_MEMBER(ICEGRID_API) void _iceI_allocateObjectByType(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::shared_ptr<::Ice::ObjectPrx>>>&, const ::std::string&, const ::Ice::Context&);
389
401 void releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
402 {
403 _makePromiseOutgoing<void>(true, this, &SessionPrx::_iceI_releaseObject, id, context).get();
404 }
405
413 template<template<typename> class P = ::std::promise>
414 auto releaseObjectAsync(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
415 -> decltype(::std::declval<P<void>>().get_future())
416 {
417 return _makePromiseOutgoing<void, P>(false, this, &SessionPrx::_iceI_releaseObject, id, context);
418 }
419
430 ::std::function<void()>
431 releaseObjectAsync(const ::Ice::Identity& id,
432 ::std::function<void()> response,
433 ::std::function<void(::std::exception_ptr)> ex = nullptr,
434 ::std::function<void(bool)> sent = nullptr,
435 const ::Ice::Context& context = ::Ice::noExplicitContext)
436 {
437 return _makeLambdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_releaseObject, id, context);
438 }
439
441 ICE_MEMBER(ICEGRID_API) void _iceI_releaseObject(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Identity&, const ::Ice::Context&);
443
452 void setAllocationTimeout(int timeout, const ::Ice::Context& context = ::Ice::noExplicitContext)
453 {
454 _makePromiseOutgoing<void>(true, this, &SessionPrx::_iceI_setAllocationTimeout, timeout, context).get();
455 }
456
466 template<template<typename> class P = ::std::promise>
467 auto setAllocationTimeoutAsync(int timeout, const ::Ice::Context& context = ::Ice::noExplicitContext)
468 -> decltype(::std::declval<P<void>>().get_future())
469 {
470 return _makePromiseOutgoing<void, P>(false, this, &SessionPrx::_iceI_setAllocationTimeout, timeout, context);
471 }
472
485 ::std::function<void()>
487 ::std::function<void()> response,
488 ::std::function<void(::std::exception_ptr)> ex = nullptr,
489 ::std::function<void(bool)> sent = nullptr,
490 const ::Ice::Context& context = ::Ice::noExplicitContext)
491 {
492 return _makeLambdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_setAllocationTimeout, timeout, context);
493 }
494
496 ICE_MEMBER(ICEGRID_API) void _iceI_setAllocationTimeout(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, int, const ::Ice::Context&);
498
503 ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
504
505protected:
506
508 SessionPrx() = default;
509 friend ::std::shared_ptr<SessionPrx> IceInternal::createProxy<SessionPrx>();
510
511 ICE_MEMBER(ICEGRID_API) virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
513};
514
515}
516
518namespace Ice
519{
520
521}
523
525namespace IceGrid
526{
527
528using SessionPtr = ::std::shared_ptr<Session>;
529using SessionPrxPtr = ::std::shared_ptr<SessionPrx>;
530
531}
533
534#else // C++98 mapping
535
536namespace IceProxy
537{
538
539namespace IceGrid
540{
541
542class Session;
544ICEGRID_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< Session>&);
545ICEGRID_API ::IceProxy::Ice::Object* upCast(Session*);
547
548}
549
550}
551
552namespace IceGrid
553{
554
555class Session;
557ICEGRID_API ::Ice::Object* upCast(Session*);
559typedef ::IceInternal::Handle< Session> SessionPtr;
560typedef ::IceInternal::ProxyHandle< ::IceProxy::IceGrid::Session> SessionPrx;
561typedef SessionPrx SessionPrxPtr;
563ICEGRID_API void _icePatchObjectPtr(SessionPtr&, const ::Ice::ObjectPtr&);
565
566}
567
568namespace IceGrid
569{
570
576class ICEGRID_API AMD_Session_allocateObjectById : public virtual ::Ice::AMDCallback
577{
578public:
579
580 virtual ~AMD_Session_allocateObjectById();
581
586 virtual void ice_response(const ::Ice::ObjectPrx& result) = 0;
587};
588
589typedef ::IceUtil::Handle< ::IceGrid::AMD_Session_allocateObjectById> AMD_Session_allocateObjectByIdPtr;
590
596class ICEGRID_API AMD_Session_allocateObjectByType : public virtual ::Ice::AMDCallback
597{
598public:
599
600 virtual ~AMD_Session_allocateObjectByType();
601
606 virtual void ice_response(const ::Ice::ObjectPrx& result) = 0;
607};
608
609typedef ::IceUtil::Handle< ::IceGrid::AMD_Session_allocateObjectByType> AMD_Session_allocateObjectByTypePtr;
610
611}
612
614namespace IceAsync
615{
616
617namespace IceGrid
618{
619
620#if defined(_MSC_VER) && (_MSC_VER >= 1900)
621# pragma warning(push)
622# pragma warning(disable:4239)
623#endif
624
625class ICEGRID_API AMD_Session_allocateObjectById : public ::IceGrid::AMD_Session_allocateObjectById, public ::IceInternal::IncomingAsync
626{
627public:
628
629 AMD_Session_allocateObjectById(::IceInternal::Incoming&);
630
631 virtual void ice_response(const ::Ice::ObjectPrx&);
632};
633
634#if defined(_MSC_VER) && (_MSC_VER >= 1900)
635# pragma warning(pop)
636#endif
637
638#if defined(_MSC_VER) && (_MSC_VER >= 1900)
639# pragma warning(push)
640# pragma warning(disable:4239)
641#endif
642
643class ICEGRID_API AMD_Session_allocateObjectByType : public ::IceGrid::AMD_Session_allocateObjectByType, public ::IceInternal::IncomingAsync
644{
645public:
646
647 AMD_Session_allocateObjectByType(::IceInternal::Incoming&);
648
649 virtual void ice_response(const ::Ice::ObjectPrx&);
650};
651
652#if defined(_MSC_VER) && (_MSC_VER >= 1900)
653# pragma warning(pop)
654#endif
655
656}
657
658}
660
661namespace IceGrid
662{
663
669class Callback_Session_keepAlive_Base : public virtual ::IceInternal::CallbackBase { };
670typedef ::IceUtil::Handle< Callback_Session_keepAlive_Base> Callback_Session_keepAlivePtr;
671
677class Callback_Session_allocateObjectById_Base : public virtual ::IceInternal::CallbackBase { };
678typedef ::IceUtil::Handle< Callback_Session_allocateObjectById_Base> Callback_Session_allocateObjectByIdPtr;
679
685class Callback_Session_allocateObjectByType_Base : public virtual ::IceInternal::CallbackBase { };
686typedef ::IceUtil::Handle< Callback_Session_allocateObjectByType_Base> Callback_Session_allocateObjectByTypePtr;
687
693class Callback_Session_releaseObject_Base : public virtual ::IceInternal::CallbackBase { };
694typedef ::IceUtil::Handle< Callback_Session_releaseObject_Base> Callback_Session_releaseObjectPtr;
695
701class Callback_Session_setAllocationTimeout_Base : public virtual ::IceInternal::CallbackBase { };
702typedef ::IceUtil::Handle< Callback_Session_setAllocationTimeout_Base> Callback_Session_setAllocationTimeoutPtr;
703
704}
705
706namespace IceProxy
707{
708
709namespace IceGrid
710{
711
712class ICE_CLASS(ICEGRID_API) Session : public virtual ::Ice::Proxy<Session, ::IceProxy::Glacier2::Session>
713{
714public:
715
722 ICE_MEMBER(ICEGRID_API) void keepAlive(const ::Ice::Context& context = ::Ice::noExplicitContext)
723 {
724 end_keepAlive(_iceI_begin_keepAlive(context, ::IceInternal::dummyCallback, 0, true));
725 }
726
734 ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::Context& context = ::Ice::noExplicitContext)
735 {
736 return _iceI_begin_keepAlive(context, ::IceInternal::dummyCallback, 0);
737 }
738
747 ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
748 {
749 return _iceI_begin_keepAlive(::Ice::noExplicitContext, cb, cookie);
750 }
751
761 ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
762 {
763 return _iceI_begin_keepAlive(context, cb, cookie);
764 }
765
774 ::Ice::AsyncResultPtr begin_keepAlive(const ::IceGrid::Callback_Session_keepAlivePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
775 {
776 return _iceI_begin_keepAlive(::Ice::noExplicitContext, cb, cookie);
777 }
778
788 ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::Context& context, const ::IceGrid::Callback_Session_keepAlivePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
789 {
790 return _iceI_begin_keepAlive(context, cb, cookie);
791 }
792
797 ICE_MEMBER(ICEGRID_API) void end_keepAlive(const ::Ice::AsyncResultPtr& result);
798
799private:
800
801 ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_keepAlive(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
802
803public:
804
819 ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
820 {
821 return end_allocateObjectById(_iceI_begin_allocateObjectById(id, context, ::IceInternal::dummyCallback, 0, true));
822 }
823
834 ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
835 {
836 return _iceI_begin_allocateObjectById(id, context, ::IceInternal::dummyCallback, 0);
837 }
838
850 ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
851 {
852 return _iceI_begin_allocateObjectById(id, ::Ice::noExplicitContext, cb, cookie);
853 }
854
867 ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
868 {
869 return _iceI_begin_allocateObjectById(id, context, cb, cookie);
870 }
871
883 ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::IceGrid::Callback_Session_allocateObjectByIdPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
884 {
885 return _iceI_begin_allocateObjectById(id, ::Ice::noExplicitContext, cb, cookie);
886 }
887
900 ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context, const ::IceGrid::Callback_Session_allocateObjectByIdPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
901 {
902 return _iceI_begin_allocateObjectById(id, context, cb, cookie);
903 }
904
914 ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx end_allocateObjectById(const ::Ice::AsyncResultPtr& result);
915
916private:
917
918 ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_allocateObjectById(const ::Ice::Identity&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
919
920public:
921
933 ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx allocateObjectByType(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
934 {
935 return end_allocateObjectByType(_iceI_begin_allocateObjectByType(type, context, ::IceInternal::dummyCallback, 0, true));
936 }
937
948 ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
949 {
950 return _iceI_begin_allocateObjectByType(type, context, ::IceInternal::dummyCallback, 0);
951 }
952
964 ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
965 {
966 return _iceI_begin_allocateObjectByType(type, ::Ice::noExplicitContext, cb, cookie);
967 }
968
981 ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
982 {
983 return _iceI_begin_allocateObjectByType(type, context, cb, cookie);
984 }
985
997 ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::IceGrid::Callback_Session_allocateObjectByTypePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
998 {
999 return _iceI_begin_allocateObjectByType(type, ::Ice::noExplicitContext, cb, cookie);
1000 }
1001
1014 ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::Context& context, const ::IceGrid::Callback_Session_allocateObjectByTypePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1015 {
1016 return _iceI_begin_allocateObjectByType(type, context, cb, cookie);
1017 }
1018
1025 ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx end_allocateObjectByType(const ::Ice::AsyncResultPtr& result);
1026
1027private:
1028
1029 ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_allocateObjectByType(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
1030
1031public:
1032
1044 ICE_MEMBER(ICEGRID_API) void releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
1045 {
1046 end_releaseObject(_iceI_begin_releaseObject(id, context, ::IceInternal::dummyCallback, 0, true));
1047 }
1048
1056 ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
1057 {
1058 return _iceI_begin_releaseObject(id, context, ::IceInternal::dummyCallback, 0);
1059 }
1060
1069 ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1070 {
1071 return _iceI_begin_releaseObject(id, ::Ice::noExplicitContext, cb, cookie);
1072 }
1073
1083 ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1084 {
1085 return _iceI_begin_releaseObject(id, context, cb, cookie);
1086 }
1087
1096 ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::IceGrid::Callback_Session_releaseObjectPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1097 {
1098 return _iceI_begin_releaseObject(id, ::Ice::noExplicitContext, cb, cookie);
1099 }
1100
1110 ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context, const ::IceGrid::Callback_Session_releaseObjectPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1111 {
1112 return _iceI_begin_releaseObject(id, context, cb, cookie);
1113 }
1114
1124 ICE_MEMBER(ICEGRID_API) void end_releaseObject(const ::Ice::AsyncResultPtr& result);
1125
1126private:
1127
1128 ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_releaseObject(const ::Ice::Identity&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
1129
1130public:
1131
1140 ICE_MEMBER(ICEGRID_API) void setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context = ::Ice::noExplicitContext)
1141 {
1142 end_setAllocationTimeout(_iceI_begin_setAllocationTimeout(timeout, context, ::IceInternal::dummyCallback, 0, true));
1143 }
1144
1154 ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context = ::Ice::noExplicitContext)
1155 {
1156 return _iceI_begin_setAllocationTimeout(timeout, context, ::IceInternal::dummyCallback, 0);
1157 }
1158
1169 ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1170 {
1171 return _iceI_begin_setAllocationTimeout(timeout, ::Ice::noExplicitContext, cb, cookie);
1172 }
1173
1185 ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1186 {
1187 return _iceI_begin_setAllocationTimeout(timeout, context, cb, cookie);
1188 }
1189
1200 ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::IceGrid::Callback_Session_setAllocationTimeoutPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1201 {
1202 return _iceI_begin_setAllocationTimeout(timeout, ::Ice::noExplicitContext, cb, cookie);
1203 }
1204
1216 ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context, const ::IceGrid::Callback_Session_setAllocationTimeoutPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1217 {
1218 return _iceI_begin_setAllocationTimeout(timeout, context, cb, cookie);
1219 }
1220
1225 ICE_MEMBER(ICEGRID_API) void end_setAllocationTimeout(const ::Ice::AsyncResultPtr& result);
1226
1227private:
1228
1229 ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_setAllocationTimeout(::Ice::Int, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
1230
1231public:
1232
1237 ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
1238
1239protected:
1241
1242 ICE_MEMBER(ICEGRID_API) virtual ::IceProxy::Ice::Object* _newInstance() const;
1244};
1245
1246}
1247
1248}
1249
1250namespace IceGrid
1251{
1252
1261class ICEGRID_API Session : virtual public ::Glacier2::Session
1262{
1263public:
1264
1265 typedef SessionPrx ProxyType;
1266 typedef SessionPtr PointerType;
1267
1268 virtual ~Session();
1269
1270#ifdef ICE_CPP11_COMPILER
1271 Session() = default;
1272 Session(const Session&) = default;
1273 Session& operator=(const Session&) = default;
1274#endif
1275
1282 virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const;
1283
1289 virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
1290
1296 virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
1297
1302 static const ::std::string& ice_staticId();
1303
1310 virtual void keepAlive(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1312 bool _iceD_keepAlive(::IceInternal::Incoming&, const ::Ice::Current&);
1314
1329 virtual void allocateObjectById_async(const ::IceGrid::AMD_Session_allocateObjectByIdPtr& cb, const ::Ice::Identity& id, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1331 bool _iceD_allocateObjectById(::IceInternal::Incoming&, const ::Ice::Current&);
1333
1345 virtual void allocateObjectByType_async(const ::IceGrid::AMD_Session_allocateObjectByTypePtr& cb, const ::std::string& type, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1347 bool _iceD_allocateObjectByType(::IceInternal::Incoming&, const ::Ice::Current&);
1349
1361 virtual void releaseObject(const ::Ice::Identity& id, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1363 bool _iceD_releaseObject(::IceInternal::Incoming&, const ::Ice::Current&);
1365
1374 virtual void setAllocationTimeout(::Ice::Int timeout, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1376 bool _iceD_setAllocationTimeout(::IceInternal::Incoming&, const ::Ice::Current&);
1378
1380 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
1382
1383protected:
1384
1386 virtual void _iceWriteImpl(::Ice::OutputStream*) const;
1387 virtual void _iceReadImpl(::Ice::InputStream*);
1389};
1390
1392inline bool operator==(const Session& lhs, const Session& rhs)
1393{
1394 return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
1395}
1396
1397inline bool operator<(const Session& lhs, const Session& rhs)
1398{
1399 return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
1400}
1402
1403}
1404
1406namespace Ice
1407{
1408
1409}
1411
1412namespace IceGrid
1413{
1414
1420template<class T>
1421class CallbackNC_Session_keepAlive : public Callback_Session_keepAlive_Base, public ::IceInternal::OnewayCallbackNC<T>
1422{
1423public:
1424
1425 typedef IceUtil::Handle<T> TPtr;
1426
1427 typedef void (T::*Exception)(const ::Ice::Exception&);
1428 typedef void (T::*Sent)(bool);
1429 typedef void (T::*Response)();
1430
1431 CallbackNC_Session_keepAlive(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1432 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
1433 {
1434 }
1435};
1436
1445template<class T> Callback_Session_keepAlivePtr
1446newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1447{
1448 return new CallbackNC_Session_keepAlive<T>(instance, cb, excb, sentcb);
1449}
1450
1458template<class T> Callback_Session_keepAlivePtr
1459newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1460{
1461 return new CallbackNC_Session_keepAlive<T>(instance, 0, excb, sentcb);
1462}
1463
1472template<class T> Callback_Session_keepAlivePtr
1473newCallback_Session_keepAlive(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1474{
1475 return new CallbackNC_Session_keepAlive<T>(instance, cb, excb, sentcb);
1476}
1477
1485template<class T> Callback_Session_keepAlivePtr
1486newCallback_Session_keepAlive(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1487{
1488 return new CallbackNC_Session_keepAlive<T>(instance, 0, excb, sentcb);
1489}
1490
1496template<class T, typename CT>
1497class Callback_Session_keepAlive : public Callback_Session_keepAlive_Base, public ::IceInternal::OnewayCallback<T, CT>
1498{
1499public:
1500
1501 typedef IceUtil::Handle<T> TPtr;
1502
1503 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1504 typedef void (T::*Sent)(bool , const CT&);
1505 typedef void (T::*Response)(const CT&);
1506
1507 Callback_Session_keepAlive(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1508 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
1509 {
1510 }
1511};
1512
1522template<class T, typename CT> Callback_Session_keepAlivePtr
1523newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1524{
1525 return new Callback_Session_keepAlive<T, CT>(instance, cb, excb, sentcb);
1526}
1527
1536template<class T, typename CT> Callback_Session_keepAlivePtr
1537newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1538{
1539 return new Callback_Session_keepAlive<T, CT>(instance, 0, excb, sentcb);
1540}
1541
1551template<class T, typename CT> Callback_Session_keepAlivePtr
1552newCallback_Session_keepAlive(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1553{
1554 return new Callback_Session_keepAlive<T, CT>(instance, cb, excb, sentcb);
1555}
1556
1565template<class T, typename CT> Callback_Session_keepAlivePtr
1566newCallback_Session_keepAlive(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1567{
1568 return new Callback_Session_keepAlive<T, CT>(instance, 0, excb, sentcb);
1569}
1570
1576template<class T>
1577class CallbackNC_Session_allocateObjectById : public Callback_Session_allocateObjectById_Base, public ::IceInternal::TwowayCallbackNC<T>
1578{
1579public:
1580
1581 typedef IceUtil::Handle<T> TPtr;
1582
1583 typedef void (T::*Exception)(const ::Ice::Exception&);
1584 typedef void (T::*Sent)(bool);
1585 typedef void (T::*Response)(const ::Ice::ObjectPrx&);
1586
1587 CallbackNC_Session_allocateObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1588 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
1589 {
1590 }
1591
1593 virtual void completed(const ::Ice::AsyncResultPtr& result) const
1594 {
1595 SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1596 ::Ice::ObjectPrx ret;
1597 try
1598 {
1599 ret = proxy->end_allocateObjectById(result);
1600 }
1601 catch(const ::Ice::Exception& ex)
1602 {
1603 ::IceInternal::CallbackNC<T>::exception(result, ex);
1604 return;
1605 }
1606 if(_response)
1607 {
1608 (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
1609 }
1610 }
1612
1613private:
1614
1615 Response _response;
1616};
1617
1626template<class T> Callback_Session_allocateObjectByIdPtr
1627newCallback_Session_allocateObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1628{
1629 return new CallbackNC_Session_allocateObjectById<T>(instance, cb, excb, sentcb);
1630}
1631
1640template<class T> Callback_Session_allocateObjectByIdPtr
1641newCallback_Session_allocateObjectById(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1642{
1643 return new CallbackNC_Session_allocateObjectById<T>(instance, cb, excb, sentcb);
1644}
1645
1651template<class T, typename CT>
1652class Callback_Session_allocateObjectById : public Callback_Session_allocateObjectById_Base, public ::IceInternal::TwowayCallback<T, CT>
1653{
1654public:
1655
1656 typedef IceUtil::Handle<T> TPtr;
1657
1658 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1659 typedef void (T::*Sent)(bool , const CT&);
1660 typedef void (T::*Response)(const ::Ice::ObjectPrx&, const CT&);
1661
1662 Callback_Session_allocateObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1663 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
1664 {
1665 }
1666
1668 virtual void completed(const ::Ice::AsyncResultPtr& result) const
1669 {
1670 SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1671 ::Ice::ObjectPrx ret;
1672 try
1673 {
1674 ret = proxy->end_allocateObjectById(result);
1675 }
1676 catch(const ::Ice::Exception& ex)
1677 {
1678 ::IceInternal::Callback<T, CT>::exception(result, ex);
1679 return;
1680 }
1681 if(_response)
1682 {
1683 (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
1684 }
1685 }
1687
1688private:
1689
1690 Response _response;
1691};
1692
1702template<class T, typename CT> Callback_Session_allocateObjectByIdPtr
1703newCallback_Session_allocateObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1704{
1705 return new Callback_Session_allocateObjectById<T, CT>(instance, cb, excb, sentcb);
1706}
1707
1717template<class T, typename CT> Callback_Session_allocateObjectByIdPtr
1718newCallback_Session_allocateObjectById(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1719{
1720 return new Callback_Session_allocateObjectById<T, CT>(instance, cb, excb, sentcb);
1721}
1722
1728template<class T>
1729class CallbackNC_Session_allocateObjectByType : public Callback_Session_allocateObjectByType_Base, public ::IceInternal::TwowayCallbackNC<T>
1730{
1731public:
1732
1733 typedef IceUtil::Handle<T> TPtr;
1734
1735 typedef void (T::*Exception)(const ::Ice::Exception&);
1736 typedef void (T::*Sent)(bool);
1737 typedef void (T::*Response)(const ::Ice::ObjectPrx&);
1738
1739 CallbackNC_Session_allocateObjectByType(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1740 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
1741 {
1742 }
1743
1745 virtual void completed(const ::Ice::AsyncResultPtr& result) const
1746 {
1747 SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1748 ::Ice::ObjectPrx ret;
1749 try
1750 {
1751 ret = proxy->end_allocateObjectByType(result);
1752 }
1753 catch(const ::Ice::Exception& ex)
1754 {
1755 ::IceInternal::CallbackNC<T>::exception(result, ex);
1756 return;
1757 }
1758 if(_response)
1759 {
1760 (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
1761 }
1762 }
1764
1765private:
1766
1767 Response _response;
1768};
1769
1778template<class T> Callback_Session_allocateObjectByTypePtr
1779newCallback_Session_allocateObjectByType(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1780{
1781 return new CallbackNC_Session_allocateObjectByType<T>(instance, cb, excb, sentcb);
1782}
1783
1792template<class T> Callback_Session_allocateObjectByTypePtr
1793newCallback_Session_allocateObjectByType(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1794{
1795 return new CallbackNC_Session_allocateObjectByType<T>(instance, cb, excb, sentcb);
1796}
1797
1803template<class T, typename CT>
1804class Callback_Session_allocateObjectByType : public Callback_Session_allocateObjectByType_Base, public ::IceInternal::TwowayCallback<T, CT>
1805{
1806public:
1807
1808 typedef IceUtil::Handle<T> TPtr;
1809
1810 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1811 typedef void (T::*Sent)(bool , const CT&);
1812 typedef void (T::*Response)(const ::Ice::ObjectPrx&, const CT&);
1813
1814 Callback_Session_allocateObjectByType(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1815 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
1816 {
1817 }
1818
1820 virtual void completed(const ::Ice::AsyncResultPtr& result) const
1821 {
1822 SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1823 ::Ice::ObjectPrx ret;
1824 try
1825 {
1826 ret = proxy->end_allocateObjectByType(result);
1827 }
1828 catch(const ::Ice::Exception& ex)
1829 {
1830 ::IceInternal::Callback<T, CT>::exception(result, ex);
1831 return;
1832 }
1833 if(_response)
1834 {
1835 (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
1836 }
1837 }
1839
1840private:
1841
1842 Response _response;
1843};
1844
1854template<class T, typename CT> Callback_Session_allocateObjectByTypePtr
1855newCallback_Session_allocateObjectByType(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1856{
1857 return new Callback_Session_allocateObjectByType<T, CT>(instance, cb, excb, sentcb);
1858}
1859
1869template<class T, typename CT> Callback_Session_allocateObjectByTypePtr
1870newCallback_Session_allocateObjectByType(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1871{
1872 return new Callback_Session_allocateObjectByType<T, CT>(instance, cb, excb, sentcb);
1873}
1874
1880template<class T>
1881class CallbackNC_Session_releaseObject : public Callback_Session_releaseObject_Base, public ::IceInternal::TwowayCallbackNC<T>
1882{
1883public:
1884
1885 typedef IceUtil::Handle<T> TPtr;
1886
1887 typedef void (T::*Exception)(const ::Ice::Exception&);
1888 typedef void (T::*Sent)(bool);
1889 typedef void (T::*Response)();
1890
1891 CallbackNC_Session_releaseObject(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1892 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
1893 {
1894 }
1895
1897 virtual void completed(const ::Ice::AsyncResultPtr& result) const
1898 {
1899 SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1900 try
1901 {
1902 proxy->end_releaseObject(result);
1903 }
1904 catch(const ::Ice::Exception& ex)
1905 {
1906 ::IceInternal::CallbackNC<T>::exception(result, ex);
1907 return;
1908 }
1909 if(_response)
1910 {
1911 (::IceInternal::CallbackNC<T>::_callback.get()->*_response)();
1912 }
1913 }
1915
1916private:
1917
1918 Response _response;
1919};
1920
1929template<class T> Callback_Session_releaseObjectPtr
1930newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1931{
1932 return new CallbackNC_Session_releaseObject<T>(instance, cb, excb, sentcb);
1933}
1934
1942template<class T> Callback_Session_releaseObjectPtr
1943newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1944{
1945 return new CallbackNC_Session_releaseObject<T>(instance, 0, excb, sentcb);
1946}
1947
1956template<class T> Callback_Session_releaseObjectPtr
1957newCallback_Session_releaseObject(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1958{
1959 return new CallbackNC_Session_releaseObject<T>(instance, cb, excb, sentcb);
1960}
1961
1969template<class T> Callback_Session_releaseObjectPtr
1970newCallback_Session_releaseObject(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1971{
1972 return new CallbackNC_Session_releaseObject<T>(instance, 0, excb, sentcb);
1973}
1974
1980template<class T, typename CT>
1981class Callback_Session_releaseObject : public Callback_Session_releaseObject_Base, public ::IceInternal::TwowayCallback<T, CT>
1982{
1983public:
1984
1985 typedef IceUtil::Handle<T> TPtr;
1986
1987 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1988 typedef void (T::*Sent)(bool , const CT&);
1989 typedef void (T::*Response)(const CT&);
1990
1991 Callback_Session_releaseObject(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1992 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
1993 {
1994 }
1995
1997 virtual void completed(const ::Ice::AsyncResultPtr& result) const
1998 {
1999 SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
2000 try
2001 {
2002 proxy->end_releaseObject(result);
2003 }
2004 catch(const ::Ice::Exception& ex)
2005 {
2006 ::IceInternal::Callback<T, CT>::exception(result, ex);
2007 return;
2008 }
2009 if(_response)
2010 {
2011 (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(CT::dynamicCast(result->getCookie()));
2012 }
2013 }
2015
2016private:
2017
2018 Response _response;
2019};
2020
2030template<class T, typename CT> Callback_Session_releaseObjectPtr
2031newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2032{
2033 return new Callback_Session_releaseObject<T, CT>(instance, cb, excb, sentcb);
2034}
2035
2044template<class T, typename CT> Callback_Session_releaseObjectPtr
2045newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2046{
2047 return new Callback_Session_releaseObject<T, CT>(instance, 0, excb, sentcb);
2048}
2049
2059template<class T, typename CT> Callback_Session_releaseObjectPtr
2060newCallback_Session_releaseObject(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2061{
2062 return new Callback_Session_releaseObject<T, CT>(instance, cb, excb, sentcb);
2063}
2064
2073template<class T, typename CT> Callback_Session_releaseObjectPtr
2074newCallback_Session_releaseObject(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2075{
2076 return new Callback_Session_releaseObject<T, CT>(instance, 0, excb, sentcb);
2077}
2078
2084template<class T>
2085class CallbackNC_Session_setAllocationTimeout : public Callback_Session_setAllocationTimeout_Base, public ::IceInternal::OnewayCallbackNC<T>
2086{
2087public:
2088
2089 typedef IceUtil::Handle<T> TPtr;
2090
2091 typedef void (T::*Exception)(const ::Ice::Exception&);
2092 typedef void (T::*Sent)(bool);
2093 typedef void (T::*Response)();
2094
2095 CallbackNC_Session_setAllocationTimeout(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
2096 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
2097 {
2098 }
2099};
2100
2109template<class T> Callback_Session_setAllocationTimeoutPtr
2110newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2111{
2112 return new CallbackNC_Session_setAllocationTimeout<T>(instance, cb, excb, sentcb);
2113}
2114
2122template<class T> Callback_Session_setAllocationTimeoutPtr
2123newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2124{
2125 return new CallbackNC_Session_setAllocationTimeout<T>(instance, 0, excb, sentcb);
2126}
2127
2136template<class T> Callback_Session_setAllocationTimeoutPtr
2137newCallback_Session_setAllocationTimeout(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2138{
2139 return new CallbackNC_Session_setAllocationTimeout<T>(instance, cb, excb, sentcb);
2140}
2141
2149template<class T> Callback_Session_setAllocationTimeoutPtr
2150newCallback_Session_setAllocationTimeout(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2151{
2152 return new CallbackNC_Session_setAllocationTimeout<T>(instance, 0, excb, sentcb);
2153}
2154
2160template<class T, typename CT>
2161class Callback_Session_setAllocationTimeout : public Callback_Session_setAllocationTimeout_Base, public ::IceInternal::OnewayCallback<T, CT>
2162{
2163public:
2164
2165 typedef IceUtil::Handle<T> TPtr;
2166
2167 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
2168 typedef void (T::*Sent)(bool , const CT&);
2169 typedef void (T::*Response)(const CT&);
2170
2171 Callback_Session_setAllocationTimeout(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
2172 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
2173 {
2174 }
2175};
2176
2186template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2187newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2188{
2189 return new Callback_Session_setAllocationTimeout<T, CT>(instance, cb, excb, sentcb);
2190}
2191
2200template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2201newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2202{
2203 return new Callback_Session_setAllocationTimeout<T, CT>(instance, 0, excb, sentcb);
2204}
2205
2215template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2216newCallback_Session_setAllocationTimeout(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2217{
2218 return new Callback_Session_setAllocationTimeout<T, CT>(instance, cb, excb, sentcb);
2219}
2220
2229template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2230newCallback_Session_setAllocationTimeout(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2231{
2232 return new Callback_Session_setAllocationTimeout<T, CT>(instance, 0, excb, sentcb);
2233}
2234
2235}
2236
2237#endif
2238
2240#endif
#define ICEGRID_API
Definition Descriptor.h:58
#define ICE_MEMBER(API)
Definition Config.h:177
A client-visible session object, which is tied to the lifecycle of a Router.
Definition Session.h:163
A session object is used by IceGrid clients to allocate and release objects.
Definition Session.h:216
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this interface.
auto releaseObjectAsync(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P< void > >().get_future())
Release an object that was allocated using allocateObjectById or allocateObjectByType.
Definition Session.h:414
auto allocateObjectByIdAsync(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P<::std::shared_ptr<::Ice::ObjectPrx > > >().get_future())
Allocate an object.
Definition Session.h:297
::std::function< void()> allocateObjectByTypeAsync(const ::std::string &type, ::std::function< void(::std::shared_ptr<::Ice::ObjectPrx >)> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object with the given type.
Definition Session.h:377
void releaseObject(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext)
Release an object that was allocated using allocateObjectById or allocateObjectByType.
Definition Session.h:401
::std::shared_ptr<::Ice::ObjectPrx > allocateObjectById(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object.
Definition Session.h:281
::std::function< void()> allocateObjectByIdAsync(const ::Ice::Identity &id, ::std::function< void(::std::shared_ptr<::Ice::ObjectPrx >)> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object.
Definition Session.h:317
auto allocateObjectByTypeAsync(const ::std::string &type, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P<::std::shared_ptr<::Ice::ObjectPrx > > >().get_future())
Allocate an object with the given type.
Definition Session.h:357
::std::function< void()> releaseObjectAsync(const ::Ice::Identity &id, ::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Release an object that was allocated using allocateObjectById or allocateObjectByType.
Definition Session.h:431
void keepAlive(const ::Ice::Context &context=::Ice::noExplicitContext)
Keep the session alive.
Definition Session.h:225
::std::shared_ptr<::Ice::ObjectPrx > allocateObjectByType(const ::std::string &type, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object with the given type.
Definition Session.h:341
auto keepAliveAsync(const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P< void > >().get_future())
Keep the session alive.
Definition Session.h:238
::std::function< void()> keepAliveAsync(::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Keep the session alive.
Definition Session.h:255
auto setAllocationTimeoutAsync(int timeout, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P< void > >().get_future())
Set the allocation timeout.
Definition Session.h:467
void setAllocationTimeout(int timeout, const ::Ice::Context &context=::Ice::noExplicitContext)
Set the allocation timeout.
Definition Session.h:452
::std::function< void()> setAllocationTimeoutAsync(int timeout, ::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Set the allocation timeout.
Definition Session.h:486
A session object is used by IceGrid clients to allocate and release objects.
Definition Session.h:87
virtual void releaseObject(::Ice::Identity id, const ::Ice::Current &current)=0
Release an object that was allocated using allocateObjectById or allocateObjectByType.
virtual::std::string ice_id(const ::Ice::Current &current) const override
Obtains a Slice type ID representing the most-derived interface supported by this object.
SessionPrx ProxyType
Definition Session.h:90
virtual void allocateObjectByTypeAsync(::std::string type, ::std::function< void(const ::std::shared_ptr<::Ice::ObjectPrx > &returnValue)> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
Allocate an object with the given type.
virtual void keepAlive(const ::Ice::Current &current)=0
Keep the session alive.
virtual bool ice_isA(::std::string id, const ::Ice::Current &current) const override
Determines whether this object supports an interface with the given Slice type ID.
virtual ::std::vector<::std::string > ice_ids(const ::Ice::Current &current) const override
Obtains a list of the Slice type IDs representing the interfaces supported by this object.
virtual void allocateObjectByIdAsync(::Ice::Identity id, ::std::function< void(const ::std::shared_ptr<::Ice::ObjectPrx > &returnValue)> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
Allocate an object.
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
virtual void setAllocationTimeout(int timeout, const ::Ice::Current &current)=0
Set the allocation timeout.
Helper template that supplies proxy factory functions.
Definition Proxy.h:1204
Definition Admin.h:73
Definition BuiltinSequences.h:56
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
int Int
The mapping for the Slice int type.
Definition Config.h:54
::std::map<::std::string, ::std::string > Context
A request context.
Definition Current.h:68
const Current emptyCurrent
A default-initialized Current instance.
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition LocalObjectF.h:17
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184
The identity of an Ice object.
Definition Identity.h:67