Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Session.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'Session.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Glacier2_Session_h_
8#define Glacier2_Session_h_
9
11#include <Ice/Ice.h>
12#include <Ice/BuiltinSequences.h>
13#include <Ice/Identity.h>
14#include "SSLInfo.h"
15#include <Glacier2/Config.h>
16
17#ifndef ICE_DISABLE_VERSION
18# if ICE_INT_VERSION != 30850
19# error Ice version mismatch: an exact match is required for beta generated code
20# endif
21#endif
22
23#ifndef GLACIER2_API
24# if defined(GLACIER2_API_EXPORTS)
25# define GLACIER2_API ICE_DECLSPEC_EXPORT
26# else
27# define GLACIER2_API ICE_DECLSPEC_IMPORT
28# endif
29#endif
30
31// NOLINTBEGIN(modernize-concat-nested-namespaces)
32
33namespace Glacier2
34{
35 class RouterPrx;
36
37 class SessionPrx;
38
39 class StringSetPrx;
40
41 class IdentitySetPrx;
42
44
46
48}
49
50namespace Glacier2
51{
52 /// Represents a session between a client application and the Glacier2 router. With Glacier2, the lifetime of a
53 /// session is tied to the Ice connection between the client and the router: the session is destroyed when the
54 /// connection is closed.
55 /// @see Router
56 /// @see SessionManager
57 /// @headerfile Glacier2/Glacier2.h
58 class GLACIER2_API SessionPrx : public Ice::Proxy<SessionPrx, Ice::ObjectPrx>
59 {
60 public:
61 /// Constructs a proxy from a Communicator and a proxy string.
62 /// @param communicator The communicator of the new proxy.
63 /// @param proxyString The proxy string to parse.
64 SessionPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
65
66 /// Copy constructor. Constructs with a copy of the contents of @p other.
67 /// @param other The proxy to copy from.
68 SessionPrx(const SessionPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
69
70 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
71 /// @param other The proxy to move from.
72 SessionPrx(SessionPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
73
74 ~SessionPrx() override;
75
76 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
77 /// @param rhs The proxy to copy from.
78 /// @return A reference to this proxy.
79 SessionPrx& operator=(const SessionPrx& rhs) noexcept
80 {
81 if (this != &rhs)
82 {
84 }
85 return *this;
86 }
87
88 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
89 /// @param rhs The proxy to move from.
91 {
92 if (this != &rhs)
93 {
94 Ice::ObjectPrx::operator=(std::move(rhs));
95 }
96 return *this;
97 }
98
99 /// Destroys this session.
100 /// @param context The request context.
101 void destroy(const Ice::Context& context = Ice::noExplicitContext) const;
102
103 /// Destroys this session.
104 /// @param context The request context.
105 /// @return A future that becomes available when the invocation completes.
106 [[nodiscard]] std::future<void> destroyAsync(const Ice::Context& context = Ice::noExplicitContext) const;
107
108 /// Destroys this session.
109 /// @param response The response callback.
110 /// @param exception The exception callback.
111 /// @param sent The sent callback.
112 /// @param context The request context.
113 /// @return A function that can be called to cancel the invocation locally.
114 // NOLINTNEXTLINE(modernize-use-nodiscard)
115 std::function<void()> destroyAsync(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;
116
117 /// @private
118 void _iceI_destroy(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
119
120 /// Gets the type ID of the associated Slice interface.
121 /// @return The string `"::Glacier2::Session"`.
122 static const char* ice_staticId() noexcept;
123
124 /// @private
125 static SessionPrx _fromReference(IceInternal::ReferencePtr ref) { return SessionPrx{std::move(ref)}; }
126
127 protected:
128 /// @private
129 SessionPrx() = default;
130
131 /// @private
132 explicit SessionPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
133 {
134 }
135 };
136
137 /// Manages a set of constraints on a SessionPrx.
138 /// @see SessionControl
139 /// @headerfile Glacier2/Glacier2.h
140 class GLACIER2_API StringSetPrx : public Ice::Proxy<StringSetPrx, Ice::ObjectPrx>
141 {
142 public:
143 /// Constructs a proxy from a Communicator and a proxy string.
144 /// @param communicator The communicator of the new proxy.
145 /// @param proxyString The proxy string to parse.
146 StringSetPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
147
148 /// Copy constructor. Constructs with a copy of the contents of @p other.
149 /// @param other The proxy to copy from.
150 StringSetPrx(const StringSetPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
151
152 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
153 /// @param other The proxy to move from.
154 StringSetPrx(StringSetPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
155
156 ~StringSetPrx() override;
157
158 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
159 /// @param rhs The proxy to copy from.
160 /// @return A reference to this proxy.
161 StringSetPrx& operator=(const StringSetPrx& rhs) noexcept
162 {
163 if (this != &rhs)
164 {
166 }
167 return *this;
168 }
169
170 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
171 /// @param rhs The proxy to move from.
173 {
174 if (this != &rhs)
175 {
176 Ice::ObjectPrx::operator=(std::move(rhs));
177 }
178 return *this;
179 }
180
181 /// Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly
182 /// removed.
183 /// @param additions The sequence of strings to add.
184 /// @param context The request context.
185 void add(const ::Ice::StringSeq& additions, const Ice::Context& context = Ice::noExplicitContext) const;
186
187 /// Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly
188 /// removed.
189 /// @param additions The sequence of strings to add.
190 /// @param context The request context.
191 /// @return A future that becomes available when the invocation completes.
192 [[nodiscard]] std::future<void> addAsync(const ::Ice::StringSeq& additions, const Ice::Context& context = Ice::noExplicitContext) const;
193
194 /// Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly
195 /// removed.
196 /// @param additions The sequence of strings to add.
197 /// @param response The response callback.
198 /// @param exception The exception callback.
199 /// @param sent The sent callback.
200 /// @param context The request context.
201 /// @return A function that can be called to cancel the invocation locally.
202 // NOLINTNEXTLINE(modernize-use-nodiscard)
203 std::function<void()> addAsync(const ::Ice::StringSeq& additions, 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;
204
205 /// @private
206 void _iceI_add(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const ::Ice::StringSeq&, const Ice::Context&) const;
207
208 /// Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.
209 /// @param deletions The sequence of strings to remove.
210 /// @param context The request context.
211 void remove(const ::Ice::StringSeq& deletions, const Ice::Context& context = Ice::noExplicitContext) const;
212
213 /// Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.
214 /// @param deletions The sequence of strings to remove.
215 /// @param context The request context.
216 /// @return A future that becomes available when the invocation completes.
217 [[nodiscard]] std::future<void> removeAsync(const ::Ice::StringSeq& deletions, const Ice::Context& context = Ice::noExplicitContext) const;
218
219 /// Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.
220 /// @param deletions The sequence of strings to remove.
221 /// @param response The response callback.
222 /// @param exception The exception callback.
223 /// @param sent The sent callback.
224 /// @param context The request context.
225 /// @return A function that can be called to cancel the invocation locally.
226 // NOLINTNEXTLINE(modernize-use-nodiscard)
227 std::function<void()> removeAsync(const ::Ice::StringSeq& deletions, 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;
228
229 /// @private
230 void _iceI_remove(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const ::Ice::StringSeq&, const Ice::Context&) const;
231
232 /// Gets a sequence of strings describing the constraints in this set.
233 /// @param context The request context.
234 /// @return The sequence of strings for this set.
235 ::Ice::StringSeq get(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
236
237 /// Gets a sequence of strings describing the constraints in this set.
238 /// @param context The request context.
239 /// @return A future that becomes available when the invocation completes. This future holds:
240 /// - The sequence of strings for this set.
241 [[nodiscard]] std::future<::Ice::StringSeq> getAsync(const Ice::Context& context = Ice::noExplicitContext) const;
242
243 /// Gets a sequence of strings describing the constraints in this set.
244 /// @param response The response callback. It accepts:
245 /// - The sequence of strings for this set.
246 /// @param exception The exception callback.
247 /// @param sent The sent callback.
248 /// @param context The request context.
249 /// @return A function that can be called to cancel the invocation locally.
250 // NOLINTNEXTLINE(modernize-use-nodiscard)
251 std::function<void()> getAsync(std::function<void(::Ice::StringSeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
252
253 /// @private
254 void _iceI_get(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::StringSeq>>&, const Ice::Context&) const;
255
256 /// Gets the type ID of the associated Slice interface.
257 /// @return The string `"::Glacier2::StringSet"`.
258 static const char* ice_staticId() noexcept;
259
260 /// @private
261 static StringSetPrx _fromReference(IceInternal::ReferencePtr ref) { return StringSetPrx{std::move(ref)}; }
262
263 protected:
264 /// @private
265 StringSetPrx() = default;
266
267 /// @private
268 explicit StringSetPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
269 {
270 }
271 };
272
273 /// Manages a set of object identity constraints on a SessionPrx.
274 /// @see SessionControl
275 /// @headerfile Glacier2/Glacier2.h
276 class GLACIER2_API IdentitySetPrx : public Ice::Proxy<IdentitySetPrx, Ice::ObjectPrx>
277 {
278 public:
279 /// Constructs a proxy from a Communicator and a proxy string.
280 /// @param communicator The communicator of the new proxy.
281 /// @param proxyString The proxy string to parse.
282 IdentitySetPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
283
284 /// Copy constructor. Constructs with a copy of the contents of @p other.
285 /// @param other The proxy to copy from.
286 IdentitySetPrx(const IdentitySetPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
287
288 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
289 /// @param other The proxy to move from.
290 IdentitySetPrx(IdentitySetPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
291
292 ~IdentitySetPrx() override;
293
294 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
295 /// @param rhs The proxy to copy from.
296 /// @return A reference to this proxy.
298 {
299 if (this != &rhs)
300 {
302 }
303 return *this;
304 }
305
306 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
307 /// @param rhs The proxy to move from.
309 {
310 if (this != &rhs)
311 {
312 Ice::ObjectPrx::operator=(std::move(rhs));
313 }
314 return *this;
315 }
316
317 /// Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are
318 /// implicitly removed.
319 /// @param additions The sequence of Ice identities to add.
320 /// @param context The request context.
321 void add(const ::Ice::IdentitySeq& additions, const Ice::Context& context = Ice::noExplicitContext) const;
322
323 /// Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are
324 /// implicitly removed.
325 /// @param additions The sequence of Ice identities to add.
326 /// @param context The request context.
327 /// @return A future that becomes available when the invocation completes.
328 [[nodiscard]] std::future<void> addAsync(const ::Ice::IdentitySeq& additions, const Ice::Context& context = Ice::noExplicitContext) const;
329
330 /// Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are
331 /// implicitly removed.
332 /// @param additions The sequence of Ice identities to add.
333 /// @param response The response callback.
334 /// @param exception The exception callback.
335 /// @param sent The sent callback.
336 /// @param context The request context.
337 /// @return A function that can be called to cancel the invocation locally.
338 // NOLINTNEXTLINE(modernize-use-nodiscard)
339 std::function<void()> addAsync(const ::Ice::IdentitySeq& additions, 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;
340
341 /// @private
342 void _iceI_add(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const ::Ice::IdentitySeq&, const Ice::Context&) const;
343
344 /// Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not
345 /// found.
346 /// @param deletions The sequence of Ice identities to remove.
347 /// @param context The request context.
348 void remove(const ::Ice::IdentitySeq& deletions, const Ice::Context& context = Ice::noExplicitContext) const;
349
350 /// Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not
351 /// found.
352 /// @param deletions The sequence of Ice identities to remove.
353 /// @param context The request context.
354 /// @return A future that becomes available when the invocation completes.
355 [[nodiscard]] std::future<void> removeAsync(const ::Ice::IdentitySeq& deletions, const Ice::Context& context = Ice::noExplicitContext) const;
356
357 /// Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not
358 /// found.
359 /// @param deletions The sequence of Ice identities to remove.
360 /// @param response The response callback.
361 /// @param exception The exception callback.
362 /// @param sent The sent callback.
363 /// @param context The request context.
364 /// @return A function that can be called to cancel the invocation locally.
365 // NOLINTNEXTLINE(modernize-use-nodiscard)
366 std::function<void()> removeAsync(const ::Ice::IdentitySeq& deletions, 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;
367
368 /// @private
369 void _iceI_remove(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const ::Ice::IdentitySeq&, const Ice::Context&) const;
370
371 /// Gets a sequence of identities describing the constraints in this set.
372 /// @param context The request context.
373 /// @return The sequence of Ice identities for this set.
374 ::Ice::IdentitySeq get(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
375
376 /// Gets a sequence of identities describing the constraints in this set.
377 /// @param context The request context.
378 /// @return A future that becomes available when the invocation completes. This future holds:
379 /// - The sequence of Ice identities for this set.
380 [[nodiscard]] std::future<::Ice::IdentitySeq> getAsync(const Ice::Context& context = Ice::noExplicitContext) const;
381
382 /// Gets a sequence of identities describing the constraints in this set.
383 /// @param response The response callback. It accepts:
384 /// - The sequence of Ice identities for this set.
385 /// @param exception The exception callback.
386 /// @param sent The sent callback.
387 /// @param context The request context.
388 /// @return A function that can be called to cancel the invocation locally.
389 // NOLINTNEXTLINE(modernize-use-nodiscard)
390 std::function<void()> getAsync(std::function<void(::Ice::IdentitySeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
391
392 /// @private
393 void _iceI_get(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::IdentitySeq>>&, const Ice::Context&) const;
394
395 /// Gets the type ID of the associated Slice interface.
396 /// @return The string `"::Glacier2::IdentitySet"`.
397 static const char* ice_staticId() noexcept;
398
399 /// @private
400 static IdentitySetPrx _fromReference(IceInternal::ReferencePtr ref) { return IdentitySetPrx{std::move(ref)}; }
401
402 protected:
403 /// @private
404 IdentitySetPrx() = default;
405
406 /// @private
407 explicit IdentitySetPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
408 {
409 }
410 };
411
412 /// Represents a router-provided object that allows an application-provided session manager to configure the
413 /// routing constraints for a session.
414 /// @see SessionManager
415 /// @headerfile Glacier2/Glacier2.h
416 class GLACIER2_API SessionControlPrx : public Ice::Proxy<SessionControlPrx, Ice::ObjectPrx>
417 {
418 public:
419 /// Constructs a proxy from a Communicator and a proxy string.
420 /// @param communicator The communicator of the new proxy.
421 /// @param proxyString The proxy string to parse.
422 SessionControlPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
423
424 /// Copy constructor. Constructs with a copy of the contents of @p other.
425 /// @param other The proxy to copy from.
426 SessionControlPrx(const SessionControlPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
427
428 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
429 /// @param other The proxy to move from.
430 SessionControlPrx(SessionControlPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
431
432 ~SessionControlPrx() override;
433
434 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
435 /// @param rhs The proxy to copy from.
436 /// @return A reference to this proxy.
438 {
439 if (this != &rhs)
440 {
442 }
443 return *this;
444 }
445
446 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
447 /// @param rhs The proxy to move from.
449 {
450 if (this != &rhs)
451 {
452 Ice::ObjectPrx::operator=(std::move(rhs));
453 }
454 return *this;
455 }
456
457 /// Gets a proxy to the object that manages the allowable categories for object identities for this session.
458 /// @param context The request context.
459 /// @return A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
460 std::optional<StringSetPrx> categories(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
461
462 /// Gets a proxy to the object that manages the allowable categories for object identities for this session.
463 /// @param context The request context.
464 /// @return A future that becomes available when the invocation completes. This future holds:
465 /// - A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
466 [[nodiscard]] std::future<std::optional<StringSetPrx>> categoriesAsync(const Ice::Context& context = Ice::noExplicitContext) const;
467
468 /// Gets a proxy to the object that manages the allowable categories for object identities for this session.
469 /// @param response The response callback. It accepts:
470 /// - A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
471 /// @param exception The exception callback.
472 /// @param sent The sent callback.
473 /// @param context The request context.
474 /// @return A function that can be called to cancel the invocation locally.
475 // NOLINTNEXTLINE(modernize-use-nodiscard)
476 std::function<void()> categoriesAsync(std::function<void(std::optional<::Glacier2::StringSetPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
477
478 /// @private
479 void _iceI_categories(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<StringSetPrx>>>&, const Ice::Context&) const;
480
481 /// Gets a proxy to the object that manages the allowable adapter identities for objects for this session.
482 /// @param context The request context.
483 /// @return A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
484 std::optional<StringSetPrx> adapterIds(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
485
486 /// Gets a proxy to the object that manages the allowable adapter identities for objects for this session.
487 /// @param context The request context.
488 /// @return A future that becomes available when the invocation completes. This future holds:
489 /// - A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
490 [[nodiscard]] std::future<std::optional<StringSetPrx>> adapterIdsAsync(const Ice::Context& context = Ice::noExplicitContext) const;
491
492 /// Gets a proxy to the object that manages the allowable adapter identities for objects for this session.
493 /// @param response The response callback. It accepts:
494 /// - A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
495 /// @param exception The exception callback.
496 /// @param sent The sent callback.
497 /// @param context The request context.
498 /// @return A function that can be called to cancel the invocation locally.
499 // NOLINTNEXTLINE(modernize-use-nodiscard)
500 std::function<void()> adapterIdsAsync(std::function<void(std::optional<::Glacier2::StringSetPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
501
502 /// @private
503 void _iceI_adapterIds(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<StringSetPrx>>>&, const Ice::Context&) const;
504
505 /// Gets a proxy to the object that manages the allowable object identities for this session.
506 /// @param context The request context.
507 /// @return A proxy to an ::Glacier2::IdentitySetPrx object. This proxy is never null.
508 std::optional<IdentitySetPrx> identities(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
509
510 /// Gets a proxy to the object that manages the allowable object identities for this session.
511 /// @param context The request context.
512 /// @return A future that becomes available when the invocation completes. This future holds:
513 /// - A proxy to an ::Glacier2::IdentitySetPrx object. This proxy is never null.
514 [[nodiscard]] std::future<std::optional<IdentitySetPrx>> identitiesAsync(const Ice::Context& context = Ice::noExplicitContext) const;
515
516 /// Gets a proxy to the object that manages the allowable object identities for this session.
517 /// @param response The response callback. It accepts:
518 /// - A proxy to an ::Glacier2::IdentitySetPrx object. This proxy is never null.
519 /// @param exception The exception callback.
520 /// @param sent The sent callback.
521 /// @param context The request context.
522 /// @return A function that can be called to cancel the invocation locally.
523 // NOLINTNEXTLINE(modernize-use-nodiscard)
524 std::function<void()> identitiesAsync(std::function<void(std::optional<::Glacier2::IdentitySetPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
525
526 /// @private
527 void _iceI_identities(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<IdentitySetPrx>>>&, const Ice::Context&) const;
528
529 /// Gets the session timeout.
530 /// @param context The request context.
531 /// @return The timeout.
532 std::int32_t getSessionTimeout(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
533
534 /// Gets the session timeout.
535 /// @param context The request context.
536 /// @return A future that becomes available when the invocation completes. This future holds:
537 /// - The timeout.
538 [[nodiscard]] std::future<std::int32_t> getSessionTimeoutAsync(const Ice::Context& context = Ice::noExplicitContext) const;
539
540 /// Gets the session timeout.
541 /// @param response The response callback. It accepts:
542 /// - The timeout.
543 /// @param exception The exception callback.
544 /// @param sent The sent callback.
545 /// @param context The request context.
546 /// @return A function that can be called to cancel the invocation locally.
547 // NOLINTNEXTLINE(modernize-use-nodiscard)
548 std::function<void()> getSessionTimeoutAsync(std::function<void(std::int32_t)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
549
550 /// @private
551 void _iceI_getSessionTimeout(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int32_t>>&, const Ice::Context&) const;
552
553 /// Destroys the associated session.
554 /// @param context The request context.
555 void destroy(const Ice::Context& context = Ice::noExplicitContext) const;
556
557 /// Destroys the associated session.
558 /// @param context The request context.
559 /// @return A future that becomes available when the invocation completes.
560 [[nodiscard]] std::future<void> destroyAsync(const Ice::Context& context = Ice::noExplicitContext) const;
561
562 /// Destroys the associated session.
563 /// @param response The response callback.
564 /// @param exception The exception callback.
565 /// @param sent The sent callback.
566 /// @param context The request context.
567 /// @return A function that can be called to cancel the invocation locally.
568 // NOLINTNEXTLINE(modernize-use-nodiscard)
569 std::function<void()> destroyAsync(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;
570
571 /// @private
572 void _iceI_destroy(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
573
574 /// Gets the type ID of the associated Slice interface.
575 /// @return The string `"::Glacier2::SessionControl"`.
576 static const char* ice_staticId() noexcept;
577
578 /// @private
579 static SessionControlPrx _fromReference(IceInternal::ReferencePtr ref) { return SessionControlPrx{std::move(ref)}; }
580
581 protected:
582 /// @private
583 SessionControlPrx() = default;
584
585 /// @private
586 explicit SessionControlPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
587 {
588 }
589 };
590
591 /// Represents an application-provided factory for session objects. You can configure a Glacier2 router with your
592 /// own SessionManager implementation; this router will then return the sessions created by this session manager to
593 /// its clients.
594 /// @headerfile Glacier2/Glacier2.h
595 class GLACIER2_API SessionManagerPrx : public Ice::Proxy<SessionManagerPrx, Ice::ObjectPrx>
596 {
597 public:
598 /// Constructs a proxy from a Communicator and a proxy string.
599 /// @param communicator The communicator of the new proxy.
600 /// @param proxyString The proxy string to parse.
601 SessionManagerPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
602
603 /// Copy constructor. Constructs with a copy of the contents of @p other.
604 /// @param other The proxy to copy from.
605 SessionManagerPrx(const SessionManagerPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
606
607 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
608 /// @param other The proxy to move from.
609 SessionManagerPrx(SessionManagerPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
610
611 ~SessionManagerPrx() override;
612
613 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
614 /// @param rhs The proxy to copy from.
615 /// @return A reference to this proxy.
617 {
618 if (this != &rhs)
619 {
621 }
622 return *this;
623 }
624
625 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
626 /// @param rhs The proxy to move from.
628 {
629 if (this != &rhs)
630 {
631 Ice::ObjectPrx::operator=(std::move(rhs));
632 }
633 return *this;
634 }
635
636 /// Creates a new session object.
637 /// @param userId The user ID for the session.
638 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
639 /// is not configured.
640 /// @param context The request context.
641 /// @return A proxy to the newly created session. This proxy is never null.
642 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
643 std::optional<SessionPrx> create(std::string_view userId, const std::optional<SessionControlPrx>& control, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
644
645 /// Creates a new session object.
646 /// @param userId The user ID for the session.
647 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
648 /// is not configured.
649 /// @param context The request context.
650 /// @return A future that becomes available when the invocation completes. This future holds:
651 /// - A proxy to the newly created session. This proxy is never null.
652 [[nodiscard]] std::future<std::optional<SessionPrx>> createAsync(std::string_view userId, const std::optional<SessionControlPrx>& control, const Ice::Context& context = Ice::noExplicitContext) const;
653
654 /// Creates a new session object.
655 /// @param userId The user ID for the session.
656 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
657 /// is not configured.
658 /// @param response The response callback. It accepts:
659 /// - A proxy to the newly created session. This proxy is never null.
660 /// @param exception The exception callback.
661 /// @param sent The sent callback.
662 /// @param context The request context.
663 /// @return A function that can be called to cancel the invocation locally.
664 // NOLINTNEXTLINE(modernize-use-nodiscard)
665 std::function<void()> createAsync(std::string_view userId, const std::optional<SessionControlPrx>& control, std::function<void(std::optional<::Glacier2::SessionPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
666
667 /// @private
668 void _iceI_create(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, std::string_view, const std::optional<SessionControlPrx>&, const Ice::Context&) const;
669
670 /// Gets the type ID of the associated Slice interface.
671 /// @return The string `"::Glacier2::SessionManager"`.
672 static const char* ice_staticId() noexcept;
673
674 /// @private
675 static SessionManagerPrx _fromReference(IceInternal::ReferencePtr ref) { return SessionManagerPrx{std::move(ref)}; }
676
677 protected:
678 /// @private
679 SessionManagerPrx() = default;
680
681 /// @private
682 explicit SessionManagerPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
683 {
684 }
685 };
686
687 /// Represents an application-provided factory for session objects. You can configure a Glacier2 router with your
688 /// own SSLSessionManager implementation; this router will then return the sessions created by this session manager
689 /// to its clients.
690 /// @headerfile Glacier2/Glacier2.h
691 class GLACIER2_API SSLSessionManagerPrx : public Ice::Proxy<SSLSessionManagerPrx, Ice::ObjectPrx>
692 {
693 public:
694 /// Constructs a proxy from a Communicator and a proxy string.
695 /// @param communicator The communicator of the new proxy.
696 /// @param proxyString The proxy string to parse.
697 SSLSessionManagerPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
698
699 /// Copy constructor. Constructs with a copy of the contents of @p other.
700 /// @param other The proxy to copy from.
701 SSLSessionManagerPrx(const SSLSessionManagerPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
702
703 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
704 /// @param other The proxy to move from.
705 SSLSessionManagerPrx(SSLSessionManagerPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
706
707 ~SSLSessionManagerPrx() override;
708
709 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
710 /// @param rhs The proxy to copy from.
711 /// @return A reference to this proxy.
713 {
714 if (this != &rhs)
715 {
717 }
718 return *this;
719 }
720
721 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
722 /// @param rhs The proxy to move from.
724 {
725 if (this != &rhs)
726 {
727 Ice::ObjectPrx::operator=(std::move(rhs));
728 }
729 return *this;
730 }
731
732 /// Creates a new session object.
733 /// @param info The SSL info.
734 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
735 /// is not configured.
736 /// @param context The request context.
737 /// @return A proxy to the newly created session. This proxy is never null.
738 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
739 std::optional<SessionPrx> create(const SSLInfo& info, const std::optional<SessionControlPrx>& control, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
740
741 /// Creates a new session object.
742 /// @param info The SSL info.
743 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
744 /// is not configured.
745 /// @param context The request context.
746 /// @return A future that becomes available when the invocation completes. This future holds:
747 /// - A proxy to the newly created session. This proxy is never null.
748 [[nodiscard]] std::future<std::optional<SessionPrx>> createAsync(const SSLInfo& info, const std::optional<SessionControlPrx>& control, const Ice::Context& context = Ice::noExplicitContext) const;
749
750 /// Creates a new session object.
751 /// @param info The SSL info.
752 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
753 /// is not configured.
754 /// @param response The response callback. It accepts:
755 /// - A proxy to the newly created session. This proxy is never null.
756 /// @param exception The exception callback.
757 /// @param sent The sent callback.
758 /// @param context The request context.
759 /// @return A function that can be called to cancel the invocation locally.
760 // NOLINTNEXTLINE(modernize-use-nodiscard)
761 std::function<void()> createAsync(const SSLInfo& info, const std::optional<SessionControlPrx>& control, std::function<void(std::optional<::Glacier2::SessionPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
762
763 /// @private
764 void _iceI_create(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, const SSLInfo&, const std::optional<SessionControlPrx>&, const Ice::Context&) const;
765
766 /// Gets the type ID of the associated Slice interface.
767 /// @return The string `"::Glacier2::SSLSessionManager"`.
768 static const char* ice_staticId() noexcept;
769
770 /// @private
771 static SSLSessionManagerPrx _fromReference(IceInternal::ReferencePtr ref) { return SSLSessionManagerPrx{std::move(ref)}; }
772
773 protected:
774 /// @private
775 SSLSessionManagerPrx() = default;
776
777 /// @private
778 explicit SSLSessionManagerPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
779 {
780 }
781 };
782}
783
784namespace Glacier2
785{
786 /// The exception that is thrown when an attempt to create a new session fails.
787 /// @headerfile Glacier2/Glacier2.h
789 {
790 public:
791 /// Default constructor.
792 CannotCreateSessionException() noexcept = default;
793
794 /// One-shot constructor to initialize all data members.
795 /// @param reason The reason why the session creation failed.
796 CannotCreateSessionException(std::string reason) noexcept :
797 reason(std::move(reason))
798 {
799 }
800
801 /// Copy constructor.
803
804 /// Creates a tuple with all the fields of this exception.
805 /// @return A tuple with all the fields of this exception.
806 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
807 {
808 return std::tie(reason);
809 }
810
811 void ice_printFields(std::ostream& os) const override;
812 /// Gets the type ID of the associated Slice exception.
813 /// @return The string `"::Glacier2::CannotCreateSessionException"`.
814 static const char* ice_staticId() noexcept;
815
816 [[nodiscard]] const char* ice_id() const noexcept override;
817
818 void ice_throw() const override;
819
820 /// The reason why the session creation failed.
821 std::string reason;
822
823 protected:
824 /// @private
825 void _writeImpl(Ice::OutputStream*) const override;
826
827 /// @private
828 void _readImpl(Ice::InputStream*) override;
829 };
830}
831
832namespace Glacier2
833{
834 /// Represents a session between a client application and the Glacier2 router. With Glacier2, the lifetime of a
835 /// session is tied to the Ice connection between the client and the router: the session is destroyed when the
836 /// connection is closed.
837 /// @see Router
838 /// @see SessionManager
839 /// @headerfile Glacier2/Glacier2.h
840 class GLACIER2_API Session : public virtual Ice::Object
841 {
842 public:
843 /// The associated proxy type.
845
846 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
847 /// @param request The incoming request.
848 /// @param sendResponse The callback to send the response.
849 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
850
851 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
852
853 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
854
855 /// Destroys this session.
856 /// @param current The Current object of the incoming request.
857 virtual void destroy(const Ice::Current& current) = 0;
858
859 /// @private
860 void _iceD_destroy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
861
862 /// Gets the type ID of the associated Slice interface.
863 /// @return The string `"::Glacier2::Session"`.
864 static const char* ice_staticId() noexcept;
865 };
866
867 /// A shared pointer to a Session.
868 using SessionPtr = std::shared_ptr<Session>;
869
870 /// Manages a set of constraints on a SessionPrx.
871 /// @see SessionControl
872 /// @headerfile Glacier2/Glacier2.h
873 class GLACIER2_API StringSet : public virtual Ice::Object
874 {
875 public:
876 /// The associated proxy type.
877 using ProxyType = StringSetPrx;
878
879 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
880 /// @param request The incoming request.
881 /// @param sendResponse The callback to send the response.
882 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
883
884 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
885
886 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
887
888 /// Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly
889 /// removed.
890 /// @param additions The sequence of strings to add.
891 /// @param current The Current object of the incoming request.
892 virtual void add(::Ice::StringSeq additions, const Ice::Current& current) = 0;
893
894 /// @private
895 void _iceD_add(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
896
897 /// Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.
898 /// @param deletions The sequence of strings to remove.
899 /// @param current The Current object of the incoming request.
900 virtual void remove(::Ice::StringSeq deletions, const Ice::Current& current) = 0;
901
902 /// @private
903 void _iceD_remove(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
904
905 /// Gets a sequence of strings describing the constraints in this set.
906 /// @param current The Current object of the incoming request.
907 /// @return The sequence of strings for this set.
908 virtual ::Ice::StringSeq get(const Ice::Current& current) = 0;
909
910 /// @private
911 void _iceD_get(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
912
913 /// Gets the type ID of the associated Slice interface.
914 /// @return The string `"::Glacier2::StringSet"`.
915 static const char* ice_staticId() noexcept;
916 };
917
918 /// A shared pointer to a StringSet.
919 using StringSetPtr = std::shared_ptr<StringSet>;
920
921 /// Manages a set of object identity constraints on a SessionPrx.
922 /// @see SessionControl
923 /// @headerfile Glacier2/Glacier2.h
924 class GLACIER2_API IdentitySet : public virtual Ice::Object
925 {
926 public:
927 /// The associated proxy type.
928 using ProxyType = IdentitySetPrx;
929
930 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
931 /// @param request The incoming request.
932 /// @param sendResponse The callback to send the response.
933 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
934
935 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
936
937 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
938
939 /// Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are
940 /// implicitly removed.
941 /// @param additions The sequence of Ice identities to add.
942 /// @param current The Current object of the incoming request.
943 virtual void add(::Ice::IdentitySeq additions, const Ice::Current& current) = 0;
944
945 /// @private
946 void _iceD_add(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
947
948 /// Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not
949 /// found.
950 /// @param deletions The sequence of Ice identities to remove.
951 /// @param current The Current object of the incoming request.
952 virtual void remove(::Ice::IdentitySeq deletions, const Ice::Current& current) = 0;
953
954 /// @private
955 void _iceD_remove(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
956
957 /// Gets a sequence of identities describing the constraints in this set.
958 /// @param current The Current object of the incoming request.
959 /// @return The sequence of Ice identities for this set.
960 virtual ::Ice::IdentitySeq get(const Ice::Current& current) = 0;
961
962 /// @private
963 void _iceD_get(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
964
965 /// Gets the type ID of the associated Slice interface.
966 /// @return The string `"::Glacier2::IdentitySet"`.
967 static const char* ice_staticId() noexcept;
968 };
969
970 /// A shared pointer to an IdentitySet.
971 using IdentitySetPtr = std::shared_ptr<IdentitySet>;
972
973 /// Represents a router-provided object that allows an application-provided session manager to configure the
974 /// routing constraints for a session.
975 /// @see SessionManager
976 /// @headerfile Glacier2/Glacier2.h
977 class GLACIER2_API SessionControl : public virtual Ice::Object
978 {
979 public:
980 /// The associated proxy type.
981 using ProxyType = SessionControlPrx;
982
983 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
984 /// @param request The incoming request.
985 /// @param sendResponse The callback to send the response.
986 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
987
988 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
989
990 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
991
992 /// Gets a proxy to the object that manages the allowable categories for object identities for this session.
993 /// @param current The Current object of the incoming request.
994 /// @return A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
995 virtual std::optional<StringSetPrx> categories(const Ice::Current& current) = 0;
996
997 /// @private
998 void _iceD_categories(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
999
1000 /// Gets a proxy to the object that manages the allowable adapter identities for objects for this session.
1001 /// @param current The Current object of the incoming request.
1002 /// @return A proxy to a ::Glacier2::StringSetPrx object. This proxy is never null.
1003 virtual std::optional<StringSetPrx> adapterIds(const Ice::Current& current) = 0;
1004
1005 /// @private
1006 void _iceD_adapterIds(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1007
1008 /// Gets a proxy to the object that manages the allowable object identities for this session.
1009 /// @param current The Current object of the incoming request.
1010 /// @return A proxy to an ::Glacier2::IdentitySetPrx object. This proxy is never null.
1011 virtual std::optional<IdentitySetPrx> identities(const Ice::Current& current) = 0;
1012
1013 /// @private
1014 void _iceD_identities(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1015
1016 /// Gets the session timeout.
1017 /// @param current The Current object of the incoming request.
1018 /// @return The timeout.
1019 virtual std::int32_t getSessionTimeout(const Ice::Current& current) = 0;
1020
1021 /// @private
1022 void _iceD_getSessionTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1023
1024 /// Destroys the associated session.
1025 /// @param current The Current object of the incoming request.
1026 virtual void destroy(const Ice::Current& current) = 0;
1027
1028 /// @private
1029 void _iceD_destroy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1030
1031 /// Gets the type ID of the associated Slice interface.
1032 /// @return The string `"::Glacier2::SessionControl"`.
1033 static const char* ice_staticId() noexcept;
1034 };
1035
1036 /// A shared pointer to a SessionControl.
1037 using SessionControlPtr = std::shared_ptr<SessionControl>;
1038
1039 /// Represents an application-provided factory for session objects. You can configure a Glacier2 router with your
1040 /// own SessionManager implementation; this router will then return the sessions created by this session manager to
1041 /// its clients.
1042 /// @headerfile Glacier2/Glacier2.h
1043 class GLACIER2_API SessionManager : public virtual Ice::Object
1044 {
1045 public:
1046 /// The associated proxy type.
1048
1049 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1050 /// @param request The incoming request.
1051 /// @param sendResponse The callback to send the response.
1052 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1053
1054 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1055
1056 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1057
1058 /// Creates a new session object.
1059 /// @param userId The user ID for the session.
1060 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
1061 /// is not configured.
1062 /// @param current The Current object of the incoming request.
1063 /// @return A proxy to the newly created session. This proxy is never null.
1064 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
1065 virtual std::optional<SessionPrx> create(std::string userId, std::optional<SessionControlPrx> control, const Ice::Current& current) = 0;
1066
1067 /// @private
1068 void _iceD_create(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1069
1070 /// Gets the type ID of the associated Slice interface.
1071 /// @return The string `"::Glacier2::SessionManager"`.
1072 static const char* ice_staticId() noexcept;
1073 };
1074
1075 /// A shared pointer to a SessionManager.
1076 using SessionManagerPtr = std::shared_ptr<SessionManager>;
1077
1078 /// Represents an application-provided factory for session objects. You can configure a Glacier2 router with your
1079 /// own SSLSessionManager implementation; this router will then return the sessions created by this session manager
1080 /// to its clients.
1081 /// @headerfile Glacier2/Glacier2.h
1082 class GLACIER2_API SSLSessionManager : public virtual Ice::Object
1083 {
1084 public:
1085 /// The associated proxy type.
1087
1088 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1089 /// @param request The incoming request.
1090 /// @param sendResponse The callback to send the response.
1091 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1092
1093 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1094
1095 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1096
1097 /// Creates a new session object.
1098 /// @param info The SSL info.
1099 /// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
1100 /// is not configured.
1101 /// @param current The Current object of the incoming request.
1102 /// @return A proxy to the newly created session. This proxy is never null.
1103 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
1104 virtual std::optional<SessionPrx> create(SSLInfo info, std::optional<SessionControlPrx> control, const Ice::Current& current) = 0;
1105
1106 /// @private
1107 void _iceD_create(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1108
1109 /// Gets the type ID of the associated Slice interface.
1110 /// @return The string `"::Glacier2::SSLSessionManager"`.
1111 static const char* ice_staticId() noexcept;
1112 };
1113
1114 /// A shared pointer to a SSLSessionManager.
1115 using SSLSessionManagerPtr = std::shared_ptr<SSLSessionManager>;
1116}
1117
1118// NOLINTEND(modernize-concat-nested-namespaces)
1119
1120#include <Ice/PopDisableWarnings.h>
1121#endif
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
CannotCreateSessionException() noexcept=default
Default constructor.
std::string reason
The reason why the session creation failed.
Definition Session.h:821
void ice_throw() const override
Throws this exception.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Session.h:806
CannotCreateSessionException(const CannotCreateSessionException &) noexcept=default
Copy constructor.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::function< void()> removeAsync(const ::Ice::IdentitySeq &deletions, 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
Removes a sequence of identities from this set of constraints.
IdentitySetPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:282
std::future<::Ice::IdentitySeq > getAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a sequence of identities describing the constraints in this set.
void remove(const ::Ice::IdentitySeq &deletions, const Ice::Context &context=Ice::noExplicitContext) const
Removes a sequence of identities from this set of constraints.
std::function< void()> addAsync(const ::Ice::IdentitySeq &additions, 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
Adds a sequence of Ice identities to this set of constraints.
IdentitySetPrx & operator=(const IdentitySetPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:297
std::function< void()> getAsync(std::function< void(::Ice::IdentitySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a sequence of identities describing the constraints in this set.
std::future< void > addAsync(const ::Ice::IdentitySeq &additions, const Ice::Context &context=Ice::noExplicitContext) const
Adds a sequence of Ice identities to this set of constraints.
void add(const ::Ice::IdentitySeq &additions, const Ice::Context &context=Ice::noExplicitContext) const
Adds a sequence of Ice identities to this set of constraints.
IdentitySetPrx & operator=(IdentitySetPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:308
::Ice::IdentitySeq get(const Ice::Context &context=Ice::noExplicitContext) const
Gets a sequence of identities describing the constraints in this set.
std::future< void > removeAsync(const ::Ice::IdentitySeq &deletions, const Ice::Context &context=Ice::noExplicitContext) const
Removes a sequence of identities from this set of constraints.
IdentitySetPrx(IdentitySetPrx &&other) noexcept
Move constructor.
Definition Session.h:290
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
IdentitySetPrx(const IdentitySetPrx &other) noexcept
Copy constructor.
Definition Session.h:286
Manages a set of object identity constraints on a SessionPrx.
Definition Session.h:277
The Glacier2 specialization of the Ice::RouterPrx interface.
Definition Router.h:44
SSLSessionManagerPrx & operator=(SSLSessionManagerPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:723
SSLSessionManagerPrx(const SSLSessionManagerPrx &other) noexcept
Copy constructor.
Definition Session.h:701
std::function< void()> createAsync(const SSLInfo &info, const std::optional< SessionControlPrx > &control, std::function< void(std::optional<::Glacier2::SessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new session object.
std::future< std::optional< SessionPrx > > createAsync(const SSLInfo &info, const std::optional< SessionControlPrx > &control, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new session object.
SSLSessionManagerPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:697
std::optional< SessionPrx > create(const SSLInfo &info, const std::optional< SessionControlPrx > &control, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new session object.
SSLSessionManagerPrx & operator=(const SSLSessionManagerPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:712
SSLSessionManagerPrx(SSLSessionManagerPrx &&other) noexcept
Move constructor.
Definition Session.h:705
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
Represents an application-provided factory for session objects.
Definition Session.h:692
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual std::optional< SessionPrx > create(SSLInfo info, std::optional< SessionControlPrx > control, const Ice::Current &current)=0
Creates a new session object.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
SSLSessionManagerPrx ProxyType
The associated proxy type.
Definition Session.h:1086
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,...
Represents an application-provided factory for session objects.
Definition Session.h:1083
std::function< void()> identitiesAsync(std::function< void(std::optional<::Glacier2::IdentitySetPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable object identities for this session.
std::function< void()> destroyAsync(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
Destroys the associated session.
std::future< std::optional< StringSetPrx > > categoriesAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable categories for object identities for this sessi...
SessionControlPrx(SessionControlPrx &&other) noexcept
Move constructor.
Definition Session.h:430
std::future< std::optional< StringSetPrx > > adapterIdsAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable adapter identities for objects for this session...
std::future< std::int32_t > getSessionTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
SessionControlPrx & operator=(SessionControlPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:448
std::future< std::optional< IdentitySetPrx > > identitiesAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable object identities for this session.
std::optional< StringSetPrx > categories(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable categories for object identities for this sessi...
std::int32_t getSessionTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::function< void()> getSessionTimeoutAsync(std::function< void(std::int32_t)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::function< void()> categoriesAsync(std::function< void(std::optional<::Glacier2::StringSetPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable categories for object identities for this sessi...
std::optional< IdentitySetPrx > identities(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable object identities for this session.
SessionControlPrx(const SessionControlPrx &other) noexcept
Copy constructor.
Definition Session.h:426
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
SessionControlPrx & operator=(const SessionControlPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:437
std::function< void()> adapterIdsAsync(std::function< void(std::optional<::Glacier2::StringSetPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable adapter identities for objects for this session...
SessionControlPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:422
void destroy(const Ice::Context &context=Ice::noExplicitContext) const
Destroys the associated session.
std::optional< StringSetPrx > adapterIds(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the object that manages the allowable adapter identities for objects for this session...
std::future< void > destroyAsync(const Ice::Context &context=Ice::noExplicitContext) const
Destroys the associated session.
Represents a router-provided object that allows an application-provided session manager to configure ...
Definition Session.h:417
std::future< std::optional< SessionPrx > > createAsync(std::string_view userId, const std::optional< SessionControlPrx > &control, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new session object.
SessionManagerPrx & operator=(SessionManagerPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:627
std::optional< SessionPrx > create(std::string_view userId, const std::optional< SessionControlPrx > &control, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new session object.
SessionManagerPrx & operator=(const SessionManagerPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:616
std::function< void()> createAsync(std::string_view userId, const std::optional< SessionControlPrx > &control, std::function< void(std::optional<::Glacier2::SessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new session object.
SessionManagerPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:601
SessionManagerPrx(SessionManagerPrx &&other) noexcept
Move constructor.
Definition Session.h:609
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
SessionManagerPrx(const SessionManagerPrx &other) noexcept
Copy constructor.
Definition Session.h:605
Represents an application-provided factory for session objects.
Definition Session.h:596
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
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,...
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual std::optional< SessionPrx > create(std::string userId, std::optional< SessionControlPrx > control, const Ice::Current &current)=0
Creates a new session object.
SessionManagerPrx ProxyType
The associated proxy type.
Definition Session.h:1047
Represents an application-provided factory for session objects.
Definition Session.h:1044
SessionPrx & operator=(const SessionPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:79
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
void destroy(const Ice::Context &context=Ice::noExplicitContext) const
Destroys this session.
SessionPrx(SessionPrx &&other) noexcept
Move constructor.
Definition Session.h:72
std::future< void > destroyAsync(const Ice::Context &context=Ice::noExplicitContext) const
Destroys this session.
std::function< void()> destroyAsync(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
Destroys this session.
SessionPrx(const SessionPrx &other) noexcept
Copy constructor.
Definition Session.h:68
SessionPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:64
SessionPrx & operator=(SessionPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:90
Represents a session between a client application and the Glacier2 router.
Definition Session.h:59
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void destroy(const Ice::Current &current)=0
Destroys this session.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
SessionPrx ProxyType
The associated proxy type.
Definition Session.h:844
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,...
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Represents a session between a client application and the Glacier2 router.
Definition Session.h:841
StringSetPrx & operator=(const StringSetPrx &rhs) noexcept
Copy assignment operator.
Definition Session.h:161
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
StringSetPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Session.h:146
StringSetPrx & operator=(StringSetPrx &&rhs) noexcept
Move assignment operator.
Definition Session.h:172
std::function< void()> getAsync(std::function< void(::Ice::StringSeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a sequence of strings describing the constraints in this set.
std::future< void > addAsync(const ::Ice::StringSeq &additions, const Ice::Context &context=Ice::noExplicitContext) const
Adds a sequence of strings to this set of constraints.
void remove(const ::Ice::StringSeq &deletions, const Ice::Context &context=Ice::noExplicitContext) const
Removes a sequence of strings from this set of constraints.
StringSetPrx(const StringSetPrx &other) noexcept
Copy constructor.
Definition Session.h:150
void add(const ::Ice::StringSeq &additions, const Ice::Context &context=Ice::noExplicitContext) const
Adds a sequence of strings to this set of constraints.
StringSetPrx(StringSetPrx &&other) noexcept
Move constructor.
Definition Session.h:154
std::future<::Ice::StringSeq > getAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a sequence of strings describing the constraints in this set.
std::future< void > removeAsync(const ::Ice::StringSeq &deletions, const Ice::Context &context=Ice::noExplicitContext) const
Removes a sequence of strings from this set of constraints.
::Ice::StringSeq get(const Ice::Context &context=Ice::noExplicitContext) const
Gets a sequence of strings describing the constraints in this set.
std::function< void()> addAsync(const ::Ice::StringSeq &additions, 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
Adds a sequence of strings to this set of constraints.
std::function< void()> removeAsync(const ::Ice::StringSeq &deletions, 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
Removes a sequence of strings from this set of constraints.
Manages a set of constraints on a SessionPrx.
Definition Session.h:141
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
Object() noexcept=default
Default constructor.
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Provides typed proxy functions.
Definition Proxy.h:45
Abstract base class for all Ice exceptions defined in Slice.
std::shared_ptr< SessionControl > SessionControlPtr
A shared pointer to a SessionControl.
Definition Session.h:1037
std::shared_ptr< StringSet > StringSetPtr
A shared pointer to a StringSet.
Definition Session.h:919
std::shared_ptr< SessionManager > SessionManagerPtr
A shared pointer to a SessionManager.
Definition Session.h:1076
std::shared_ptr< SSLSessionManager > SSLSessionManagerPtr
A shared pointer to a SSLSessionManager.
Definition Session.h:1115
std::shared_ptr< Session > SessionPtr
A shared pointer to a Session.
Definition Session.h:868
std::shared_ptr< IdentitySet > IdentitySetPtr
A shared pointer to an IdentitySet.
Definition Session.h:971
Communicate through firewalls and across NATs.
std::vector< Identity > IdentitySeq
A sequence of identities.
Definition Identity.h:31
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::vector< std::string > StringSeq
A sequence of strings.
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:59
Represents information gathered from an incoming SSL connection and used for authentication and autho...
Definition SSLInfo.h:42
Provides information about an incoming request being dispatched.
Definition Current.h:18