Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Router.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'Router.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Glacier2_Router_h_
8#define Glacier2_Router_h_
9
11#include <Ice/Ice.h>
12#include <Ice/Router.h>
13#include "PermissionsVerifier.h"
14#include "Session.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
33/// Communicate through firewalls and across NATs.
34namespace Glacier2
35{
36 class RouterPrx;
37}
38
39namespace Glacier2
40{
41 /// The Glacier2 specialization of the ::Ice::RouterPrx interface.
42 /// @headerfile Glacier2/Glacier2.h
43 class GLACIER2_API RouterPrx : public Ice::Proxy<RouterPrx, ::Ice::RouterPrx>
44 {
45 public:
46#if defined(__GNUC__) && !defined(__clang__)
47# pragma GCC diagnostic push
48# pragma GCC diagnostic ignored "-Wextra" // initialize all virtual bases in correct order
49#endif
50
51 /// Constructs a proxy from a Communicator and a proxy string.
52 /// @param communicator The communicator of the new proxy.
53 /// @param proxyString The proxy string to parse.
54 RouterPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
55
56 /// Copy constructor. Constructs with a copy of the contents of @p other.
57 /// @param other The proxy to copy from.
58 RouterPrx(const RouterPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
59
60 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
61 /// @param other The proxy to move from.
62 RouterPrx(RouterPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
63
64 ~RouterPrx() override;
65
66 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
67 /// @param rhs The proxy to copy from.
68 /// @return A reference to this proxy.
69 RouterPrx& operator=(const RouterPrx& rhs) noexcept
70 {
71 if (this != &rhs)
72 {
74 }
75 return *this;
76 }
77
78 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
79 /// @param rhs The proxy to move from.
80 RouterPrx& operator=(RouterPrx&& rhs) noexcept
81 {
82 if (this != &rhs)
83 {
84 Ice::ObjectPrx::operator=(std::move(rhs));
85 }
86 return *this;
87 }
88
89 /// Gets a unique category that identifies the client (caller) in the router. This category must be used in the
90 /// identities of all the client's callback objects.
91 /// @param context The request context.
92 /// @return The category. It's an empty string when `Glacier2.Server.Endpoints` is not configured.
93 std::string getCategoryForClient(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
94
95 /// Gets a unique category that identifies the client (caller) in the router. This category must be used in the
96 /// identities of all the client's callback objects.
97 /// @param context The request context.
98 /// @return A future that becomes available when the invocation completes. This future holds:
99 /// - The category. It's an empty string when `Glacier2.Server.Endpoints` is not configured.
100 [[nodiscard]] std::future<std::string> getCategoryForClientAsync(const Ice::Context& context = Ice::noExplicitContext) const;
101
102 /// Gets a unique category that identifies the client (caller) in the router. This category must be used in the
103 /// identities of all the client's callback objects.
104 /// @param response The response callback. It accepts:
105 /// - The category. It's an empty string when `Glacier2.Server.Endpoints` is not configured.
106 /// @param exception The exception callback.
107 /// @param sent The sent callback.
108 /// @param context The request context.
109 /// @return A function that can be called to cancel the invocation locally.
110 // NOLINTNEXTLINE(modernize-use-nodiscard)
111 std::function<void()> getCategoryForClientAsync(std::function<void(std::string)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
112
113 /// @private
114 void _iceI_getCategoryForClient(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, const Ice::Context&) const;
115
116 /// Creates a session for the client (caller) with the router. If a ::Glacier2::SessionManagerPrx is configured,
117 /// a proxy to a ::Glacier2::SessionPrx object is returned to the client. Otherwise, null is returned and only an
118 /// internal session (i.e., not visible to the client) is created.
119 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
120 /// This occurs automatically when the router is configured as the client's default router at the time the
121 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
122 /// explicitly.
123 /// @param userId The user ID.
124 /// @param password The password.
125 /// @param context The request context.
126 /// @return A proxy for the newly created session, or null if no ::Glacier2::SessionManagerPrx is configured.
127 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
128 /// @throws Glacier2::PermissionDeniedException Thrown when an authentication or authorization failure occurs.
129 /// @see Session
130 /// @see SessionManager
131 /// @see PermissionsVerifier
132 std::optional<SessionPrx> createSession(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
133
134 /// Creates a session for the client (caller) with the router. If a ::Glacier2::SessionManagerPrx is configured,
135 /// a proxy to a ::Glacier2::SessionPrx object is returned to the client. Otherwise, null is returned and only an
136 /// internal session (i.e., not visible to the client) is created.
137 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
138 /// This occurs automatically when the router is configured as the client's default router at the time the
139 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
140 /// explicitly.
141 /// @param userId The user ID.
142 /// @param password The password.
143 /// @param context The request context.
144 /// @return A future that becomes available when the invocation completes. This future holds:
145 /// - A proxy for the newly created session, or null if no ::Glacier2::SessionManagerPrx is configured.
146 /// @see Session
147 /// @see SessionManager
148 /// @see PermissionsVerifier
149 [[nodiscard]] std::future<std::optional<SessionPrx>> createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const;
150
151 /// Creates a session for the client (caller) with the router. If a ::Glacier2::SessionManagerPrx is configured,
152 /// a proxy to a ::Glacier2::SessionPrx object is returned to the client. Otherwise, null is returned and only an
153 /// internal session (i.e., not visible to the client) is created.
154 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
155 /// This occurs automatically when the router is configured as the client's default router at the time the
156 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
157 /// explicitly.
158 /// @param userId The user ID.
159 /// @param password The password.
160 /// @param response The response callback. It accepts:
161 /// - A proxy for the newly created session, or null if no ::Glacier2::SessionManagerPrx is configured.
162 /// @param exception The exception callback.
163 /// @param sent The sent callback.
164 /// @param context The request context.
165 /// @return A function that can be called to cancel the invocation locally.
166 /// @see Session
167 /// @see SessionManager
168 /// @see PermissionsVerifier
169 // NOLINTNEXTLINE(modernize-use-nodiscard)
170 std::function<void()> createSessionAsync(std::string_view userId, std::string_view password, 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;
171
172 /// @private
173 void _iceI_createSession(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, std::string_view, std::string_view, const Ice::Context&) const;
174
175 /// Creates a per-client session with the router. The user is authenticated through the SSL certificate(s)
176 /// associated with the connection. If an ::Glacier2::SSLSessionManagerPrx is configured, a proxy to a ::Glacier2::SessionPrx
177 /// object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not
178 /// visible to the client) is created.
179 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
180 /// This occurs automatically when the router is configured as the client's default router at the time the
181 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
182 /// explicitly.
183 /// @param context The request context.
184 /// @return A proxy for the newly created session, or null if no ::Glacier2::SSLSessionManagerPrx is configured.
185 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
186 /// @throws Glacier2::PermissionDeniedException Thrown when an authentication or authorization failure occurs.
187 /// @see Session
188 /// @see SessionManager
189 /// @see PermissionsVerifier
190 std::optional<SessionPrx> createSessionFromSecureConnection(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
191
192 /// Creates a per-client session with the router. The user is authenticated through the SSL certificate(s)
193 /// associated with the connection. If an ::Glacier2::SSLSessionManagerPrx is configured, a proxy to a ::Glacier2::SessionPrx
194 /// object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not
195 /// visible to the client) is created.
196 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
197 /// This occurs automatically when the router is configured as the client's default router at the time the
198 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
199 /// explicitly.
200 /// @param context The request context.
201 /// @return A future that becomes available when the invocation completes. This future holds:
202 /// - A proxy for the newly created session, or null if no ::Glacier2::SSLSessionManagerPrx is configured.
203 /// @see Session
204 /// @see SessionManager
205 /// @see PermissionsVerifier
206 [[nodiscard]] std::future<std::optional<SessionPrx>> createSessionFromSecureConnectionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
207
208 /// Creates a per-client session with the router. The user is authenticated through the SSL certificate(s)
209 /// associated with the connection. If an ::Glacier2::SSLSessionManagerPrx is configured, a proxy to a ::Glacier2::SessionPrx
210 /// object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not
211 /// visible to the client) is created.
212 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
213 /// This occurs automatically when the router is configured as the client's default router at the time the
214 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
215 /// explicitly.
216 /// @param response The response callback. It accepts:
217 /// - A proxy for the newly created session, or null if no ::Glacier2::SSLSessionManagerPrx is configured.
218 /// @param exception The exception callback.
219 /// @param sent The sent callback.
220 /// @param context The request context.
221 /// @return A function that can be called to cancel the invocation locally.
222 /// @see Session
223 /// @see SessionManager
224 /// @see PermissionsVerifier
225 // NOLINTNEXTLINE(modernize-use-nodiscard)
226 std::function<void()> createSessionFromSecureConnectionAsync(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;
227
228 /// @private
229 void _iceI_createSessionFromSecureConnection(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, const Ice::Context&) const;
230
231 /// Keeps the session with this router alive.
232 /// @param context The request context.
233 /// @throws Glacier2::SessionNotExistException Thrown when no session exists for the caller (client).
234 [[deprecated("As of Ice 3.8, this operation does nothing.")]] void refreshSession(const Ice::Context& context = Ice::noExplicitContext) const;
235
236 /// Keeps the session with this router alive.
237 /// @param context The request context.
238 /// @return A future that becomes available when the invocation completes.
239 [[deprecated("As of Ice 3.8, this operation does nothing.")]] [[nodiscard]] std::future<void> refreshSessionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
240
241 /// Keeps the session with this router alive.
242 /// @param response The response callback.
243 /// @param exception The exception callback.
244 /// @param sent The sent callback.
245 /// @param context The request context.
246 /// @return A function that can be called to cancel the invocation locally.
247 // NOLINTNEXTLINE(modernize-use-nodiscard)
248 [[deprecated("As of Ice 3.8, this operation does nothing.")]] std::function<void()> refreshSessionAsync(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;
249
250 /// @private
251 void _iceI_refreshSession(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
252
253 /// Destroys the session of the caller with this router.
254 /// @param context The request context.
255 /// @throws Glacier2::SessionNotExistException Thrown when no session exists for the caller (client).
257
258 /// Destroys the session of the caller with this router.
259 /// @param context The request context.
260 /// @return A future that becomes available when the invocation completes.
261 [[nodiscard]] std::future<void> destroySessionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
262
263 /// Destroys the session of the caller with this router.
264 /// @param response The response callback.
265 /// @param exception The exception callback.
266 /// @param sent The sent callback.
267 /// @param context The request context.
268 /// @return A function that can be called to cancel the invocation locally.
269 // NOLINTNEXTLINE(modernize-use-nodiscard)
270 std::function<void()> destroySessionAsync(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;
271
272 /// @private
273 void _iceI_destroySession(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
274
275 /// Gets the idle timeout used by the server-side of the connection.
276 /// @param context The request context.
277 /// @return The idle timeout (in seconds).
278 std::int64_t getSessionTimeout(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
279
280 /// Gets the idle timeout used by the server-side of the connection.
281 /// @param context The request context.
282 /// @return A future that becomes available when the invocation completes. This future holds:
283 /// - The idle timeout (in seconds).
284 [[nodiscard]] std::future<std::int64_t> getSessionTimeoutAsync(const Ice::Context& context = Ice::noExplicitContext) const;
285
286 /// Gets the idle timeout used by the server-side of the connection.
287 /// @param response The response callback. It accepts:
288 /// - The idle timeout (in seconds).
289 /// @param exception The exception callback.
290 /// @param sent The sent callback.
291 /// @param context The request context.
292 /// @return A function that can be called to cancel the invocation locally.
293 // NOLINTNEXTLINE(modernize-use-nodiscard)
294 std::function<void()> getSessionTimeoutAsync(std::function<void(std::int64_t)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
295
296 /// @private
297 void _iceI_getSessionTimeout(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int64_t>>&, const Ice::Context&) const;
298
299 /// Gets the idle timeout used by the server-side of the connection.
300 /// @param context The request context.
301 /// @return The idle timeout (in seconds).
302 std::int32_t getACMTimeout(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
303
304 /// Gets the idle timeout used by the server-side of the connection.
305 /// @param context The request context.
306 /// @return A future that becomes available when the invocation completes. This future holds:
307 /// - The idle timeout (in seconds).
308 [[nodiscard]] std::future<std::int32_t> getACMTimeoutAsync(const Ice::Context& context = Ice::noExplicitContext) const;
309
310 /// Gets the idle timeout used by the server-side of the connection.
311 /// @param response The response callback. It accepts:
312 /// - The idle timeout (in seconds).
313 /// @param exception The exception callback.
314 /// @param sent The sent callback.
315 /// @param context The request context.
316 /// @return A function that can be called to cancel the invocation locally.
317 // NOLINTNEXTLINE(modernize-use-nodiscard)
318 std::function<void()> getACMTimeoutAsync(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;
319
320 /// @private
321 void _iceI_getACMTimeout(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int32_t>>&, const Ice::Context&) const;
322
323 /// Gets the type ID of the associated Slice interface.
324 /// @return The string `"::Glacier2::Router"`.
325 static const char* ice_staticId() noexcept;
326
327 /// @private
328 static RouterPrx _fromReference(IceInternal::ReferencePtr ref) { return RouterPrx{std::move(ref)}; }
329
330 protected:
331 /// @private
332 RouterPrx() = default;
333
334 /// @private
335 explicit RouterPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
336 {
337 }
338
339#if defined(__GNUC__) && !defined(__clang__)
340# pragma GCC diagnostic pop
341#endif
342 };
343}
344
345namespace Glacier2
346{
347 /// The exception that is thrown when a client tries to destroy a session with a router, but no session exists for
348 /// this client.
349 /// @see Router#destroySession
350 /// @headerfile Glacier2/Glacier2.h
352 {
353 public:
354 /// Gets the type ID of the associated Slice exception.
355 /// @return The string `"::Glacier2::SessionNotExistException"`.
356 static const char* ice_staticId() noexcept;
357
358 [[nodiscard]] const char* ice_id() const noexcept override;
359
360 void ice_throw() const override;
361
362 protected:
363 /// @private
364 void _writeImpl(Ice::OutputStream*) const override;
365
366 /// @private
367 void _readImpl(Ice::InputStream*) override;
368 };
369}
370
371namespace Glacier2
372{
373 /// The Glacier2 specialization of the ::Ice::RouterPrx interface.
374 /// @headerfile Glacier2/Glacier2.h
375 class GLACIER2_API Router : public virtual ::Ice::Router
376 {
377 public:
378 /// The associated proxy type.
379 using ProxyType = RouterPrx;
380
381 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
382 /// @param request The incoming request.
383 /// @param sendResponse The callback to send the response.
384 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
385
386 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
387
388 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
389
390 /// Gets a unique category that identifies the client (caller) in the router. This category must be used in the
391 /// identities of all the client's callback objects.
392 /// @param current The Current object of the incoming request.
393 /// @return The category. It's an empty string when `Glacier2.Server.Endpoints` is not configured.
394 [[nodiscard]] virtual std::string getCategoryForClient(const Ice::Current& current) const = 0;
395
396 /// @private
397 void _iceD_getCategoryForClient(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
398
399 /// Creates a session for the client (caller) with the router. If a ::Glacier2::SessionManagerPrx is configured,
400 /// a proxy to a ::Glacier2::SessionPrx object is returned to the client. Otherwise, null is returned and only an
401 /// internal session (i.e., not visible to the client) is created.
402 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
403 /// This occurs automatically when the router is configured as the client's default router at the time the
404 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
405 /// explicitly.
406 /// @param userId The user ID.
407 /// @param password The password.
408 /// @param response The response callback. It accepts:
409 /// - A proxy for the newly created session, or null if no ::Glacier2::SessionManagerPrx is configured.
410 /// @param exception The exception callback.
411 /// @param current The Current object of the incoming request.
412 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
413 /// @throws Glacier2::PermissionDeniedException Thrown when an authentication or authorization failure occurs.
414 /// @see Session
415 /// @see SessionManager
416 /// @see PermissionsVerifier
417 virtual void createSessionAsync(std::string userId, std::string password, std::function<void(const std::optional<SessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
418
419 /// @private
420 void _iceD_createSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
421
422 /// Creates a per-client session with the router. The user is authenticated through the SSL certificate(s)
423 /// associated with the connection. If an ::Glacier2::SSLSessionManagerPrx is configured, a proxy to a ::Glacier2::SessionPrx
424 /// object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not
425 /// visible to the client) is created.
426 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
427 /// This occurs automatically when the router is configured as the client's default router at the time the
428 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
429 /// explicitly.
430 /// @param response The response callback. It accepts:
431 /// - A proxy for the newly created session, or null if no ::Glacier2::SSLSessionManagerPrx is configured.
432 /// @param exception The exception callback.
433 /// @param current The Current object of the incoming request.
434 /// @throws Glacier2::CannotCreateSessionException Thrown when the session cannot be created.
435 /// @throws Glacier2::PermissionDeniedException Thrown when an authentication or authorization failure occurs.
436 /// @see Session
437 /// @see SessionManager
438 /// @see PermissionsVerifier
439 virtual void createSessionFromSecureConnectionAsync(std::function<void(const std::optional<SessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
440
441 /// @private
442 void _iceD_createSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
443
444 /// Keeps the session with this router alive.
445 /// @param current The Current object of the incoming request.
446 /// @throws Glacier2::SessionNotExistException Thrown when no session exists for the caller (client).
447 virtual void refreshSession(const Ice::Current& current) = 0;
448
449 /// @private
450 void _iceD_refreshSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
451
452 /// Destroys the session of the caller with this router.
453 /// @param current The Current object of the incoming request.
454 /// @throws Glacier2::SessionNotExistException Thrown when no session exists for the caller (client).
455 virtual void destroySession(const Ice::Current& current) = 0;
456
457 /// @private
458 void _iceD_destroySession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
459
460 /// Gets the idle timeout used by the server-side of the connection.
461 /// @param current The Current object of the incoming request.
462 /// @return The idle timeout (in seconds).
463 [[nodiscard]] virtual std::int64_t getSessionTimeout(const Ice::Current& current) const = 0;
464
465 /// @private
466 void _iceD_getSessionTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
467
468 /// Gets the idle timeout used by the server-side of the connection.
469 /// @param current The Current object of the incoming request.
470 /// @return The idle timeout (in seconds).
471 [[nodiscard]] virtual std::int32_t getACMTimeout(const Ice::Current& current) const = 0;
472
473 /// @private
474 void _iceD_getACMTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
475
476 /// Gets the type ID of the associated Slice interface.
477 /// @return The string `"::Glacier2::Router"`.
478 static const char* ice_staticId() noexcept;
479 };
480
481 /// A shared pointer to a Router.
482 using RouterPtr = std::shared_ptr<Router>;
483}
484
485// NOLINTEND(modernize-concat-nested-namespaces)
486
488#endif
std::optional< SessionPrx > createSessionFromSecureConnection(const Ice::Context &context=Ice::noExplicitContext) const
Creates a per-client session with the router.
std::future< std::int64_t > getSessionTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::int32_t getACMTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::function< void()> getACMTimeoutAsync(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 idle timeout used by the server-side of the connection.
std::int64_t getSessionTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::future< void > destroySessionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Destroys the session of the caller with this router.
std::future< std::optional< SessionPrx > > createSessionFromSecureConnectionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Creates a per-client session with the router.
void destroySession(const Ice::Context &context=Ice::noExplicitContext) const
Destroys the session of the caller with this router.
RouterPrx(const RouterPrx &other) noexcept
Copy constructor.
Definition Router.h:58
std::optional< SessionPrx > createSession(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a session for the client (caller) with the router.
std::future< void > refreshSessionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session with this router alive.
RouterPrx & operator=(RouterPrx &&rhs) noexcept
Move assignment operator.
Definition Router.h:80
std::function< void()> getSessionTimeoutAsync(std::function< void(std::int64_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 idle timeout used by the server-side of the connection.
void refreshSession(const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session with this router alive.
std::string getCategoryForClient(const Ice::Context &context=Ice::noExplicitContext) const
Gets a unique category that identifies the client (caller) in the router.
RouterPrx & operator=(const RouterPrx &rhs) noexcept
Copy assignment operator.
Definition Router.h:69
std::future< std::string > getCategoryForClientAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a unique category that identifies the client (caller) in the router.
RouterPrx(RouterPrx &&other) noexcept
Move constructor.
Definition Router.h:62
std::function< void()> createSessionAsync(std::string_view userId, std::string_view password, 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 session for the client (caller) with the router.
std::function< void()> refreshSessionAsync(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 with this router alive.
RouterPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Router.h:54
std::function< void()> destroySessionAsync(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 session of the caller with this router.
std::future< std::optional< SessionPrx > > createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a session for the client (caller) with the router.
std::function< void()> getCategoryForClientAsync(std::function< void(std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a unique category that identifies the client (caller) in the router.
std::function< void()> createSessionFromSecureConnectionAsync(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 per-client session with the router.
std::future< std::int32_t > getACMTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
The Glacier2 specialization of the Ice::RouterPrx interface.
Definition Router.h:44
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
The exception that is thrown when a client tries to destroy a session with a router,...
Definition Router.h:352
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
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Definition Router.h:283
Abstract base class for all Ice exceptions defined in Slice.
std::shared_ptr< Router > RouterPtr
A shared pointer to a Router.
Definition Router.h:482
Communicate through firewalls and across NATs.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:28
The Ice RPC framework.
Definition SampleEvent.h:59
Provides information about an incoming request being dispatched.
Definition Current.h:18