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