Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches
Session.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.9.0-alpha.0
4// <auto-generated>Generated from Slice file 'Session.ice'.</auto-generated>
5// clang-format off
6
7#ifndef IceGrid_Session_h_
8#define IceGrid_Session_h_
9
11#include <Ice/Ice.h>
12#include "Exception.h"
13#include <Glacier2/Session.h>
14#include <IceGrid/Config.h>
15
16#ifndef ICE_DISABLE_VERSION
17# if ICE_INT_VERSION != 30950
18# error Ice version mismatch: an exact match is required for beta generated code
19# endif
20#endif
21
22#ifndef ICEGRID_API
23# if defined(ICEGRID_API_EXPORTS)
24# define ICEGRID_API ICE_DECLSPEC_EXPORT
25# else
26# define ICEGRID_API ICE_DECLSPEC_IMPORT
27# endif
28#endif
29
30// NOLINTBEGIN(modernize-concat-nested-namespaces)
31
32namespace IceGrid
33{
34 class RegistryPrx;
35
36 class SessionPrx;
37}
38
39namespace IceGrid
40{
41 /// Represents a session object used by IceGrid clients to allocate and release objects. Client sessions are created
42 /// either via the RegistryPrx object or via the registry client ::Glacier2::SessionManagerPrx object.
43 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::Session`.
44 /// @headerfile IceGrid/IceGrid.h
45 class ICEGRID_API SessionPrx : public Ice::Proxy<SessionPrx, ::Glacier2::SessionPrx>
46 {
47 public:
48#if defined(__GNUC__) && !defined(__clang__)
49# pragma GCC diagnostic push
50# pragma GCC diagnostic ignored "-Wextra" // initialize all virtual bases in correct order
51#endif
52
53 /// Constructs a proxy from a Communicator and a proxy string.
54 /// @param communicator The communicator of the new proxy.
55 /// @param proxyString The proxy string to parse.
56 SessionPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
57
58 /// Copy constructor. Constructs with a copy of the contents of @p other.
59 /// @param other The proxy to copy from.
60 SessionPrx(const SessionPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
61
62 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
63 /// @param other The proxy to move from.
64 SessionPrx(SessionPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
65
66 ~SessionPrx() override;
67
68 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
69 /// @param rhs The proxy to copy from.
70 /// @return A reference to this proxy.
71 SessionPrx& operator=(const SessionPrx& rhs) noexcept
72 {
73 if (this != &rhs)
74 {
76 }
77 return *this;
78 }
79
80 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
81 /// @param rhs The proxy to move from.
83 {
84 if (this != &rhs)
85 {
86 Ice::ObjectPrx::operator=(std::move(rhs));
87 }
88 return *this;
89 }
90
91 /// Keeps the session alive.
92 /// @param context The request context.
93 [[deprecated("As of Ice 3.8, there is no need to call this operation, and its implementation does nothing.")]] void keepAlive(const Ice::Context& context = Ice::noExplicitContext) const;
94
95 /// Keeps the session alive.
96 /// @param context The request context.
97 /// @return A future that becomes available when the invocation completes.
98 [[deprecated("As of Ice 3.8, there is no need to call this operation, and its implementation does nothing.")]] [[nodiscard]] std::future<void> keepAliveAsync(const Ice::Context& context = Ice::noExplicitContext) const;
99
100 /// Keeps the session alive.
101 /// @param response The response callback.
102 /// @param exception The exception callback.
103 /// @param sent The sent callback.
104 /// @param context The request context.
105 /// @return A function that can be called to cancel the invocation locally.
106 // NOLINTNEXTLINE(modernize-use-nodiscard)
107 [[deprecated("As of Ice 3.8, there is no need to call this operation, and its implementation does nothing.")]] std::function<void()> keepAliveAsync(std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
108
109 /// @private
110 void _iceI_keepAlive(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
111
112 /// Allocates an object.
113 /// @param id The identity of the object to allocate.
114 /// @param context The request context.
115 /// @return A proxy to the allocated object. This proxy is never null.
116 /// @throws IceGrid::AllocationException Thrown when the allocation fails.
117 /// @throws IceGrid::ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
118 /// the registry.
119 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
120 /// @see ::IceGrid::SessionPrx::releaseObject
121 std::optional<Ice::ObjectPrx> allocateObjectById(const ::Ice::Identity& id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
122
123 /// Allocates an object.
124 /// @param id The identity of the object to allocate.
125 /// @param context The request context.
126 /// @return A future that becomes available when the invocation completes. This future holds:
127 /// - A proxy to the allocated object. This proxy is never null.
128 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
129 /// @see ::IceGrid::SessionPrx::releaseObject
130 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> allocateObjectByIdAsync(const ::Ice::Identity& id, const Ice::Context& context = Ice::noExplicitContext) const;
131
132 /// Allocates an object.
133 /// @param id The identity of the object to allocate.
134 /// @param response The response callback. It accepts:
135 /// - A proxy to the allocated object. This proxy is never null.
136 /// @param exception The exception callback.
137 /// @param sent The sent callback.
138 /// @param context The request context.
139 /// @return A function that can be called to cancel the invocation locally.
140 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
141 /// @see ::IceGrid::SessionPrx::releaseObject
142 // NOLINTNEXTLINE(modernize-use-nodiscard)
143 std::function<void()> allocateObjectByIdAsync(const ::Ice::Identity& id, std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
144
145 /// @private
146 void _iceI_allocateObjectById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const ::Ice::Identity&, const Ice::Context&) const;
147
148 /// Allocates an object with the given type.
149 /// @param type The type of the object.
150 /// @param context The request context.
151 /// @return A proxy to the allocated object. This proxy is never null.
152 /// @throws IceGrid::AllocationException Thrown when the allocation fails.
153 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
154 /// @see ::IceGrid::SessionPrx::releaseObject
155 std::optional<Ice::ObjectPrx> allocateObjectByType(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
156
157 /// Allocates an object with the given type.
158 /// @param type The type of the object.
159 /// @param context The request context.
160 /// @return A future that becomes available when the invocation completes. This future holds:
161 /// - A proxy to the allocated object. This proxy is never null.
162 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
163 /// @see ::IceGrid::SessionPrx::releaseObject
164 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> allocateObjectByTypeAsync(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const;
165
166 /// Allocates an object with the given type.
167 /// @param type The type of the object.
168 /// @param response The response callback. It accepts:
169 /// - A proxy to the allocated object. This proxy is never null.
170 /// @param exception The exception callback.
171 /// @param sent The sent callback.
172 /// @param context The request context.
173 /// @return A function that can be called to cancel the invocation locally.
174 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
175 /// @see ::IceGrid::SessionPrx::releaseObject
176 // NOLINTNEXTLINE(modernize-use-nodiscard)
177 std::function<void()> allocateObjectByTypeAsync(std::string_view type, std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
178
179 /// @private
180 void _iceI_allocateObjectByType(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, const Ice::Context&) const;
181
182 /// Releases an object that was allocated using ::IceGrid::SessionPrx::allocateObjectById or ::IceGrid::SessionPrx::allocateObjectByType.
183 /// @param id The identity of the object to release.
184 /// @param context The request context.
185 /// @throws IceGrid::AllocationException Thrown when the object can't be released. This can happen when the object is not
186 /// allocatable or is not allocated by this session.
187 /// @throws IceGrid::ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
188 /// the registry.
189 void releaseObject(const ::Ice::Identity& id, const Ice::Context& context = Ice::noExplicitContext) const;
190
191 /// Releases an object that was allocated using ::IceGrid::SessionPrx::allocateObjectById or ::IceGrid::SessionPrx::allocateObjectByType.
192 /// @param id The identity of the object to release.
193 /// @param context The request context.
194 /// @return A future that becomes available when the invocation completes.
195 [[nodiscard]] std::future<void> releaseObjectAsync(const ::Ice::Identity& id, const Ice::Context& context = Ice::noExplicitContext) const;
196
197 /// Releases an object that was allocated using ::IceGrid::SessionPrx::allocateObjectById or ::IceGrid::SessionPrx::allocateObjectByType.
198 /// @param id The identity of the object to release.
199 /// @param response The response callback.
200 /// @param exception The exception callback.
201 /// @param sent The sent callback.
202 /// @param context The request context.
203 /// @return A function that can be called to cancel the invocation locally.
204 // NOLINTNEXTLINE(modernize-use-nodiscard)
205 std::function<void()> releaseObjectAsync(const ::Ice::Identity& id, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
206
207 /// @private
208 void _iceI_releaseObject(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Identity&, const Ice::Context&) const;
209
210 /// Sets the allocation timeout. When no object is immediately available for an allocation request, the
211 /// implementation of ::IceGrid::SessionPrx::allocateObjectById and ::IceGrid::SessionPrx::allocateObjectByType waits for the duration of
212 /// this @p timeout.
213 /// @param timeout The timeout in milliseconds.
214 /// @param context The request context.
215 void setAllocationTimeout(std::int32_t timeout, const Ice::Context& context = Ice::noExplicitContext) const;
216
217 /// Sets the allocation timeout. When no object is immediately available for an allocation request, the
218 /// implementation of ::IceGrid::SessionPrx::allocateObjectById and ::IceGrid::SessionPrx::allocateObjectByType waits for the duration of
219 /// this @p timeout.
220 /// @param timeout The timeout in milliseconds.
221 /// @param context The request context.
222 /// @return A future that becomes available when the invocation completes.
223 [[nodiscard]] std::future<void> setAllocationTimeoutAsync(std::int32_t timeout, const Ice::Context& context = Ice::noExplicitContext) const;
224
225 /// Sets the allocation timeout. When no object is immediately available for an allocation request, the
226 /// implementation of ::IceGrid::SessionPrx::allocateObjectById and ::IceGrid::SessionPrx::allocateObjectByType waits for the duration of
227 /// this @p timeout.
228 /// @param timeout The timeout in milliseconds.
229 /// @param response The response callback.
230 /// @param exception The exception callback.
231 /// @param sent The sent callback.
232 /// @param context The request context.
233 /// @return A function that can be called to cancel the invocation locally.
234 // NOLINTNEXTLINE(modernize-use-nodiscard)
235 std::function<void()> setAllocationTimeoutAsync(std::int32_t timeout, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
236
237 /// @private
238 void _iceI_setAllocationTimeout(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::int32_t, const Ice::Context&) const;
239
240 /// Gets the type ID of the associated Slice interface.
241 /// @return The string `"::IceGrid::Session"`.
242 static const char* ice_staticId() noexcept;
243
244 /// @private
245 static SessionPrx _fromReference(IceInternal::ReferencePtr ref) { return SessionPrx{std::move(ref)}; }
246
247 protected:
248 /// @private
249 SessionPrx() = default;
250
251 /// @private
252 explicit SessionPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
253 {
254 }
255
256#if defined(__GNUC__) && !defined(__clang__)
257# pragma GCC diagnostic pop
258#endif
259 };
260}
261
262namespace IceGrid
263{
264 /// Represents a session object used by IceGrid clients to allocate and release objects. Client sessions are created
265 /// either via the RegistryPrx object or via the registry client ::Glacier2::SessionManagerPrx object.
266 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Session`.
267 /// @headerfile IceGrid/IceGrid.h
268 class ICEGRID_API Session : public virtual ::Glacier2::Session
269 {
270 public:
271 /// The associated proxy type.
272 using ProxyType = SessionPrx;
273
274 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
275 /// @param request The incoming request.
276 /// @param sendResponse The callback to send the response.
277 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
278
279 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
280
281 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
282
283 /// Keeps the session alive.
284 /// @param current The Current object of the incoming request.
285 virtual void keepAlive(const Ice::Current& current) = 0;
286
287 /// @private
288 void _iceD_keepAlive(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
289
290 /// Allocates an object.
291 /// @param id The identity of the object to allocate.
292 /// @param current The Current object of the incoming request.
293 /// @return A proxy to the allocated object. This proxy is never null.
294 /// @throws IceGrid::AllocationException Thrown when the allocation fails.
295 /// @throws IceGrid::ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
296 /// the registry.
297 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
298 /// @see ::IceGrid::SessionPrx::releaseObject
299 virtual std::optional<Ice::ObjectPrx> allocateObjectById(::Ice::Identity id, const Ice::Current& current) = 0;
300
301 /// @private
302 void _iceD_allocateObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
303
304 /// Allocates an object with the given type.
305 /// @param type The type of the object.
306 /// @param current The Current object of the incoming request.
307 /// @return A proxy to the allocated object. This proxy is never null.
308 /// @throws IceGrid::AllocationException Thrown when the allocation fails.
309 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
310 /// @see ::IceGrid::SessionPrx::releaseObject
311 virtual std::optional<Ice::ObjectPrx> allocateObjectByType(std::string type, const Ice::Current& current) = 0;
312
313 /// @private
314 void _iceD_allocateObjectByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
315
316 /// Releases an object that was allocated using ::IceGrid::SessionPrx::allocateObjectById or ::IceGrid::SessionPrx::allocateObjectByType.
317 /// @param id The identity of the object to release.
318 /// @param current The Current object of the incoming request.
319 /// @throws IceGrid::AllocationException Thrown when the object can't be released. This can happen when the object is not
320 /// allocatable or is not allocated by this session.
321 /// @throws IceGrid::ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
322 /// the registry.
323 virtual void releaseObject(::Ice::Identity id, const Ice::Current& current) = 0;
324
325 /// @private
326 void _iceD_releaseObject(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
327
328 /// Sets the allocation timeout. When no object is immediately available for an allocation request, the
329 /// implementation of ::IceGrid::SessionPrx::allocateObjectById and ::IceGrid::SessionPrx::allocateObjectByType waits for the duration of
330 /// this @p timeout.
331 /// @param timeout The timeout in milliseconds.
332 /// @param current The Current object of the incoming request.
333 virtual void setAllocationTimeout(std::int32_t timeout, const Ice::Current& current) = 0;
334
335 /// @private
336 void _iceD_setAllocationTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
337
338 /// Gets the type ID of the associated Slice interface.
339 /// @return The string `"::IceGrid::Session"`.
340 static const char* ice_staticId() noexcept;
341 };
342
343 /// A shared pointer to a Session.
344 using SessionPtr = std::shared_ptr<Session>;
345}
346
347namespace IceGrid
348{
349 /// Represents a session object used by IceGrid clients to allocate and release objects. Client sessions are created
350 /// either via the RegistryPrx object or via the registry client ::Glacier2::SessionManagerPrx object.
351 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Session`.
352 /// @headerfile IceGrid/IceGrid.h
353 class ICEGRID_API AsyncSession : public virtual ::Glacier2::AsyncSession
354 {
355 public:
356 /// The associated proxy type.
358
359 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
360 /// @param request The incoming request.
361 /// @param sendResponse The callback to send the response.
362 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
363
364 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
365
366 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
367
368 /// Keeps the session alive.
369 /// @param response The response callback.
370 /// @param exception The exception callback.
371 /// @param current The Current object of the incoming request.
372 virtual void keepAliveAsync(std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
373
374 /// @private
375 void _iceD_keepAlive(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
376
377 /// Allocates an object.
378 /// @param id The identity of the object to allocate.
379 /// @param response The response callback. It accepts:
380 /// - A proxy to the allocated object. This proxy is never null.
381 /// @param exception The exception callback.
382 /// @param current The Current object of the incoming request.
383 /// @throws IceGrid::AllocationException Thrown when the allocation fails.
384 /// @throws IceGrid::ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
385 /// the registry.
386 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
387 /// @see ::IceGrid::SessionPrx::releaseObject
388 virtual void allocateObjectByIdAsync(::Ice::Identity id, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
389
390 /// @private
391 void _iceD_allocateObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
392
393 /// Allocates an object with the given type.
394 /// @param type The type of the object.
395 /// @param response The response callback. It accepts:
396 /// - A proxy to the allocated object. This proxy is never null.
397 /// @param exception The exception callback.
398 /// @param current The Current object of the incoming request.
399 /// @throws IceGrid::AllocationException Thrown when the allocation fails.
400 /// @see ::IceGrid::SessionPrx::setAllocationTimeout
401 /// @see ::IceGrid::SessionPrx::releaseObject
402 virtual void allocateObjectByTypeAsync(std::string type, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
403
404 /// @private
405 void _iceD_allocateObjectByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
406
407 /// Releases an object that was allocated using ::IceGrid::SessionPrx::allocateObjectById or ::IceGrid::SessionPrx::allocateObjectByType.
408 /// @param id The identity of the object to release.
409 /// @param response The response callback.
410 /// @param exception The exception callback.
411 /// @param current The Current object of the incoming request.
412 /// @throws IceGrid::AllocationException Thrown when the object can't be released. This can happen when the object is not
413 /// allocatable or is not allocated by this session.
414 /// @throws IceGrid::ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
415 /// the registry.
416 virtual void releaseObjectAsync(::Ice::Identity id, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
417
418 /// @private
419 void _iceD_releaseObject(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
420
421 /// Sets the allocation timeout. When no object is immediately available for an allocation request, the
422 /// implementation of ::IceGrid::SessionPrx::allocateObjectById and ::IceGrid::SessionPrx::allocateObjectByType waits for the duration of
423 /// this @p timeout.
424 /// @param timeout The timeout in milliseconds.
425 /// @param response The response callback.
426 /// @param exception The exception callback.
427 /// @param current The Current object of the incoming request.
428 virtual void setAllocationTimeoutAsync(std::int32_t timeout, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
429
430 /// @private
431 void _iceD_setAllocationTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
432
433 /// Gets the type ID of the associated Slice interface.
434 /// @return The string `"::IceGrid::Session"`.
435 static const char* ice_staticId() noexcept;
436 };
437
438 /// A shared pointer to an AsyncSession.
439 using AsyncSessionPtr = std::shared_ptr<AsyncSession>;
440}
441
442// NOLINTEND(modernize-concat-nested-namespaces)
443
444#include <Ice/PopDisableWarnings.h>
445#endif
Represents a session between a client application and the Glacier2 router.
Definition Session.h:1141
SessionPrx ProxyType
The associated proxy type.
Definition Session.h:357
virtual void setAllocationTimeoutAsync(std::int32_t timeout, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Sets the allocation timeout.
virtual void allocateObjectByTypeAsync(std::string type, std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Allocates an object with the given type.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual void allocateObjectByIdAsync(::Ice::Identity id, std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Allocates an object.
virtual void keepAliveAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Keeps the session alive.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void releaseObjectAsync(::Ice::Identity id, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Releases an object that was allocated using IceGrid::SessionPrx::allocateObjectById or IceGrid::Sessi...
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
Represents a session object used by IceGrid clients to allocate and release objects.
Definition Session.h:354
Represents the main entry point into the IceGrid registry service.
Definition Registry.h:278
std::future< std::optional< Ice::ObjectPrx > > allocateObjectByIdAsync(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Allocates an object.
std::optional< Ice::ObjectPrx > allocateObjectById(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Allocates an object.
SessionPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:56
std::future< std::optional< Ice::ObjectPrx > > allocateObjectByTypeAsync(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Allocates an object with the given type.
std::function< void()> keepAliveAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session alive.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
SessionPrx(const SessionPrx &other) noexcept
Copy constructor.
Definition Session.h:60
std::future< void > releaseObjectAsync(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Releases an object that was allocated using IceGrid::SessionPrx::allocateObjectById or IceGrid::Sessi...
SessionPrx & operator=(const SessionPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:71
void releaseObject(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Releases an object that was allocated using IceGrid::SessionPrx::allocateObjectById or IceGrid::Sessi...
void setAllocationTimeout(std::int32_t timeout, const Ice::Context &context=Ice::noExplicitContext) const
Sets the allocation timeout.
std::function< void()> allocateObjectByIdAsync(const ::Ice::Identity &id, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Allocates an object.
std::optional< Ice::ObjectPrx > allocateObjectByType(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Allocates an object with the given type.
SessionPrx & operator=(SessionPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:82
void keepAlive(const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session alive.
std::future< void > setAllocationTimeoutAsync(std::int32_t timeout, const Ice::Context &context=Ice::noExplicitContext) const
Sets the allocation timeout.
SessionPrx(SessionPrx &&other) noexcept
Move constructor.
Definition Session.h:64
std::function< void()> allocateObjectByTypeAsync(std::string_view type, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Allocates an object with the given type.
std::future< void > keepAliveAsync(const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session alive.
std::function< void()> setAllocationTimeoutAsync(std::int32_t timeout, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Sets the allocation timeout.
std::function< void()> releaseObjectAsync(const ::Ice::Identity &id, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Releases an object that was allocated using IceGrid::SessionPrx::allocateObjectById or IceGrid::Sessi...
Represents a session object used by IceGrid clients to allocate and release objects.
Definition Session.h:46
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
Represents the response to an incoming request.
Provides typed proxy functions.
Definition Proxy.h:45
std::shared_ptr< Session > SessionPtr
A shared pointer to a Session.
Definition Session.h:344
std::shared_ptr< AsyncSession > AsyncSessionPtr
A shared pointer to an AsyncSession.
Definition Session.h:439
Deploy and manage Ice servers.
Definition Admin.h:34
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:28
The Ice RPC framework.
Definition SampleEvent.h:60
Provides information about an incoming request being dispatched.
Definition Current.h:18
Represents the identity of an Ice object.
Definition Identity.h:41