Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Registry.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'Registry.ice'.</auto-generated>
5// clang-format off
6
7#ifndef IceGrid_Registry_h_
8#define IceGrid_Registry_h_
9
11#include <Ice/Ice.h>
12#include "Admin.h"
13#include <Ice/Locator.h>
14#include "Session.h"
15#include <IceGrid/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 ICEGRID_API
24# if defined(ICEGRID_API_EXPORTS)
25# define ICEGRID_API ICE_DECLSPEC_EXPORT
26# else
27# define ICEGRID_API ICE_DECLSPEC_IMPORT
28# endif
29#endif
30
31// NOLINTBEGIN(modernize-concat-nested-namespaces)
32
33/// Deploy and manage Ice servers.
34namespace IceGrid
35{
36 /// Determines which load sampling interval to use.
37 /// @remarks The Slice compiler generated this enum class from Slice enumeration `::IceGrid::LoadSample`.
38 enum class LoadSample : std::uint8_t
39 {
40 /// Sample every minute.
42
43 /// Sample every five minutes.
45
46 /// Sample every fifteen minutes.
48 };
49
50 /// Outputs the enumerator name or underlying value of a LoadSample to a stream.
51 /// @param os The output stream.
52 /// @param value The value to output.
53 /// @return The output stream.
54 ICEGRID_API std::ostream& operator<<(std::ostream& os, LoadSample value);
55
56 class QueryPrx;
57
58 class RegistryPrx;
59
60 class LocatorPrx;
61}
62
63namespace IceGrid
64{
65 /// Finds well-known Ice objects registered with the IceGrid registry.
66 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::Query`.
67 /// @headerfile IceGrid/IceGrid.h
68 class ICEGRID_API QueryPrx : public Ice::Proxy<QueryPrx, Ice::ObjectPrx>
69 {
70 public:
71 /// Constructs a proxy from a Communicator and a proxy string.
72 /// @param communicator The communicator of the new proxy.
73 /// @param proxyString The proxy string to parse.
74 QueryPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
75
76 /// Copy constructor. Constructs with a copy of the contents of @p other.
77 /// @param other The proxy to copy from.
78 QueryPrx(const QueryPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
79
80 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
81 /// @param other The proxy to move from.
82 QueryPrx(QueryPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
83
84 ~QueryPrx() override;
85
86 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
87 /// @param rhs The proxy to copy from.
88 /// @return A reference to this proxy.
89 QueryPrx& operator=(const QueryPrx& rhs) noexcept
90 {
91 if (this != &rhs)
92 {
94 }
95 return *this;
96 }
97
98 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
99 /// @param rhs The proxy to move from.
100 QueryPrx& operator=(QueryPrx&& rhs) noexcept
101 {
102 if (this != &rhs)
103 {
104 Ice::ObjectPrx::operator=(std::move(rhs));
105 }
106 return *this;
107 }
108
109 /// Finds a well-known object by identity.
110 /// @param id The identity.
111 /// @param context The request context.
112 /// @return A proxy to the well-known object, or null if no such object is registered.
113 std::optional<Ice::ObjectPrx> findObjectById(const ::Ice::Identity& id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
114
115 /// Finds a well-known object by identity.
116 /// @param id The identity.
117 /// @param context The request context.
118 /// @return A future that becomes available when the invocation completes. This future holds:
119 /// - A proxy to the well-known object, or null if no such object is registered.
120 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByIdAsync(const ::Ice::Identity& id, const Ice::Context& context = Ice::noExplicitContext) const;
121
122 /// Finds a well-known object by identity.
123 /// @param id The identity.
124 /// @param response The response callback. It accepts:
125 /// - A proxy to the well-known object, or null if no such object is registered.
126 /// @param exception The exception callback.
127 /// @param sent The sent callback.
128 /// @param context The request context.
129 /// @return A function that can be called to cancel the invocation locally.
130 // NOLINTNEXTLINE(modernize-use-nodiscard)
131 std::function<void()> findObjectByIdAsync(const ::Ice::Identity& id, std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
132
133 /// @private
134 void _iceI_findObjectById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const ::Ice::Identity&, const Ice::Context&) const;
135
136 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
137 /// randomly selected.
138 /// @param type The object type.
139 /// @param context The request context.
140 /// @return A proxy to a well-known object with the specified type, or null if no such object is registered.
141 std::optional<Ice::ObjectPrx> findObjectByType(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
142
143 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
144 /// randomly selected.
145 /// @param type The object type.
146 /// @param context The request context.
147 /// @return A future that becomes available when the invocation completes. This future holds:
148 /// - A proxy to a well-known object with the specified type, or null if no such object is registered.
149 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByTypeAsync(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const;
150
151 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
152 /// randomly selected.
153 /// @param type The object type.
154 /// @param response The response callback. It accepts:
155 /// - A proxy to a well-known object with the specified type, or null if no such object is registered.
156 /// @param exception The exception callback.
157 /// @param sent The sent callback.
158 /// @param context The request context.
159 /// @return A function that can be called to cancel the invocation locally.
160 // NOLINTNEXTLINE(modernize-use-nodiscard)
161 std::function<void()> findObjectByTypeAsync(std::string_view type, std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
162
163 /// @private
164 void _iceI_findObjectByType(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, const Ice::Context&) const;
165
166 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
167 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
168 /// object is hosted on a node that has a load average of 1.0.
169 /// @param type The object type.
170 /// @param sample The sampling interval.
171 /// @param context The request context.
172 /// @return A proxy to the well-known object, or null if no such object is registered.
173 std::optional<Ice::ObjectPrx> findObjectByTypeOnLeastLoadedNode(std::string_view type, LoadSample sample, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
174
175 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
176 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
177 /// object is hosted on a node that has a load average of 1.0.
178 /// @param type The object type.
179 /// @param sample The sampling interval.
180 /// @param context The request context.
181 /// @return A future that becomes available when the invocation completes. This future holds:
182 /// - A proxy to the well-known object, or null if no such object is registered.
183 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, const Ice::Context& context = Ice::noExplicitContext) const;
184
185 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
186 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
187 /// object is hosted on a node that has a load average of 1.0.
188 /// @param type The object type.
189 /// @param sample The sampling interval.
190 /// @param response The response callback. It accepts:
191 /// - A proxy to the well-known object, or null if no such object is registered.
192 /// @param exception The exception callback.
193 /// @param sent The sent callback.
194 /// @param context The request context.
195 /// @return A function that can be called to cancel the invocation locally.
196 // NOLINTNEXTLINE(modernize-use-nodiscard)
197 std::function<void()> findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
198
199 /// @private
200 void _iceI_findObjectByTypeOnLeastLoadedNode(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, LoadSample, const Ice::Context&) const;
201
202 /// Finds all the well-known objects with the given type.
203 /// @param type The object type.
204 /// @param context The request context.
205 /// @return A list of proxies to the well-known objects with the specified type. Can be empty.
206 ::Ice::ObjectProxySeq findAllObjectsByType(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
207
208 /// Finds all the well-known objects with the given type.
209 /// @param type The object type.
210 /// @param context The request context.
211 /// @return A future that becomes available when the invocation completes. This future holds:
212 /// - A list of proxies to the well-known objects with the specified type. Can be empty.
213 [[nodiscard]] std::future<::Ice::ObjectProxySeq> findAllObjectsByTypeAsync(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const;
214
215 /// Finds all the well-known objects with the given type.
216 /// @param type The object type.
217 /// @param response The response callback. It accepts:
218 /// - A list of proxies to the well-known objects with the specified type. Can be empty.
219 /// @param exception The exception callback.
220 /// @param sent The sent callback.
221 /// @param context The request context.
222 /// @return A function that can be called to cancel the invocation locally.
223 // NOLINTNEXTLINE(modernize-use-nodiscard)
224 std::function<void()> findAllObjectsByTypeAsync(std::string_view type, std::function<void(::Ice::ObjectProxySeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
225
226 /// @private
227 void _iceI_findAllObjectsByType(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::ObjectProxySeq>>&, std::string_view, const Ice::Context&) const;
228
229 /// Finds all the replicas of a well-known object.
230 /// @param proxy A proxy that identifies the well-known object.
231 /// @param context The request context.
232 /// @return A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
233 ::Ice::ObjectProxySeq findAllReplicas(const std::optional<Ice::ObjectPrx>& proxy, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
234
235 /// Finds all the replicas of a well-known object.
236 /// @param proxy A proxy that identifies the well-known object.
237 /// @param context The request context.
238 /// @return A future that becomes available when the invocation completes. This future holds:
239 /// - A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
240 [[nodiscard]] std::future<::Ice::ObjectProxySeq> findAllReplicasAsync(const std::optional<Ice::ObjectPrx>& proxy, const Ice::Context& context = Ice::noExplicitContext) const;
241
242 /// Finds all the replicas of a well-known object.
243 /// @param proxy A proxy that identifies the well-known object.
244 /// @param response The response callback. It accepts:
245 /// - A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
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()> findAllReplicasAsync(const std::optional<Ice::ObjectPrx>& proxy, std::function<void(::Ice::ObjectProxySeq)> 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_findAllReplicas(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::ObjectProxySeq>>&, const std::optional<Ice::ObjectPrx>&, const Ice::Context&) const;
255
256 /// Gets the type ID of the associated Slice interface.
257 /// @return The string `"::IceGrid::Query"`.
258 static const char* ice_staticId() noexcept;
259
260 /// @private
261 static QueryPrx _fromReference(IceInternal::ReferencePtr ref) { return QueryPrx{std::move(ref)}; }
262
263 protected:
264 /// @private
265 QueryPrx() = default;
266
267 /// @private
268 explicit QueryPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
269 {
270 }
271 };
272
273 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
274 /// with the registry.
275 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::Registry`.
276 /// @headerfile IceGrid/IceGrid.h
277 class ICEGRID_API RegistryPrx : public Ice::Proxy<RegistryPrx, Ice::ObjectPrx>
278 {
279 public:
280 /// Constructs a proxy from a Communicator and a proxy string.
281 /// @param communicator The communicator of the new proxy.
282 /// @param proxyString The proxy string to parse.
283 RegistryPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
284
285 /// Copy constructor. Constructs with a copy of the contents of @p other.
286 /// @param other The proxy to copy from.
287 RegistryPrx(const RegistryPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
288
289 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
290 /// @param other The proxy to move from.
291 RegistryPrx(RegistryPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
292
293 ~RegistryPrx() override;
294
295 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
296 /// @param rhs The proxy to copy from.
297 /// @return A reference to this proxy.
298 RegistryPrx& operator=(const RegistryPrx& rhs) noexcept
299 {
300 if (this != &rhs)
301 {
303 }
304 return *this;
305 }
306
307 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
308 /// @param rhs The proxy to move from.
310 {
311 if (this != &rhs)
312 {
313 Ice::ObjectPrx::operator=(std::move(rhs));
314 }
315 return *this;
316 }
317
318 /// Creates a client session.
319 /// @param userId The user ID.
320 /// @param password The password for the given user.
321 /// @param context The request context.
322 /// @return A proxy to the newly created session. This proxy is never null.
323 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
324 std::optional<SessionPrx> createSession(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
325
326 /// Creates a client session.
327 /// @param userId The user ID.
328 /// @param password The password for the given user.
329 /// @param context The request context.
330 /// @return A future that becomes available when the invocation completes. This future holds:
331 /// - A proxy to the newly created session. This proxy is never null.
332 [[nodiscard]] std::future<std::optional<SessionPrx>> createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const;
333
334 /// Creates a client session.
335 /// @param userId The user ID.
336 /// @param password The password for the given user.
337 /// @param response The response callback. It accepts:
338 /// - A proxy to the newly created session. This proxy is never null.
339 /// @param exception The exception callback.
340 /// @param sent The sent callback.
341 /// @param context The request context.
342 /// @return A function that can be called to cancel the invocation locally.
343 // NOLINTNEXTLINE(modernize-use-nodiscard)
344 std::function<void()> createSessionAsync(std::string_view userId, std::string_view password, std::function<void(std::optional<::IceGrid::SessionPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
345
346 /// @private
347 void _iceI_createSession(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, std::string_view, std::string_view, const Ice::Context&) const;
348
349 /// Creates an administrative session.
350 /// @param userId The user ID.
351 /// @param password The password for the given user.
352 /// @param context The request context.
353 /// @return A proxy to the newly created session. This proxy is never null.
354 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
355 std::optional<AdminSessionPrx> createAdminSession(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
356
357 /// Creates an administrative session.
358 /// @param userId The user ID.
359 /// @param password The password for the given user.
360 /// @param context The request context.
361 /// @return A future that becomes available when the invocation completes. This future holds:
362 /// - A proxy to the newly created session. This proxy is never null.
363 [[nodiscard]] std::future<std::optional<AdminSessionPrx>> createAdminSessionAsync(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const;
364
365 /// Creates an administrative session.
366 /// @param userId The user ID.
367 /// @param password The password for the given user.
368 /// @param response The response callback. It accepts:
369 /// - A proxy to the newly created session. This proxy is never null.
370 /// @param exception The exception callback.
371 /// @param sent The sent callback.
372 /// @param context The request context.
373 /// @return A function that can be called to cancel the invocation locally.
374 // NOLINTNEXTLINE(modernize-use-nodiscard)
375 std::function<void()> createAdminSessionAsync(std::string_view userId, std::string_view password, std::function<void(std::optional<::IceGrid::AdminSessionPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
376
377 /// @private
378 void _iceI_createAdminSession(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<AdminSessionPrx>>>&, std::string_view, std::string_view, const Ice::Context&) const;
379
380 /// Creates a client session from a secure connection.
381 /// @param context The request context.
382 /// @return A proxy to the newly created session. This proxy is never null.
383 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
384 std::optional<SessionPrx> createSessionFromSecureConnection(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
385
386 /// Creates a client session from a secure connection.
387 /// @param context The request context.
388 /// @return A future that becomes available when the invocation completes. This future holds:
389 /// - A proxy to the newly created session. This proxy is never null.
390 [[nodiscard]] std::future<std::optional<SessionPrx>> createSessionFromSecureConnectionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
391
392 /// Creates a client session from a secure connection.
393 /// @param response The response callback. It accepts:
394 /// - A proxy to the newly created session. This proxy is never null.
395 /// @param exception The exception callback.
396 /// @param sent The sent callback.
397 /// @param context The request context.
398 /// @return A function that can be called to cancel the invocation locally.
399 // NOLINTNEXTLINE(modernize-use-nodiscard)
400 std::function<void()> createSessionFromSecureConnectionAsync(std::function<void(std::optional<::IceGrid::SessionPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
401
402 /// @private
403 void _iceI_createSessionFromSecureConnection(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, const Ice::Context&) const;
404
405 /// Creates an administrative session from a secure connection.
406 /// @param context The request context.
407 /// @return A proxy to the newly created session. This proxy is never null.
408 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
409 std::optional<AdminSessionPrx> createAdminSessionFromSecureConnection(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
410
411 /// Creates an administrative session from a secure connection.
412 /// @param context The request context.
413 /// @return A future that becomes available when the invocation completes. This future holds:
414 /// - A proxy to the newly created session. This proxy is never null.
415 [[nodiscard]] std::future<std::optional<AdminSessionPrx>> createAdminSessionFromSecureConnectionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
416
417 /// Creates an administrative session from a secure connection.
418 /// @param response The response callback. It accepts:
419 /// - A proxy to the newly created session. This proxy is never null.
420 /// @param exception The exception callback.
421 /// @param sent The sent callback.
422 /// @param context The request context.
423 /// @return A function that can be called to cancel the invocation locally.
424 // NOLINTNEXTLINE(modernize-use-nodiscard)
425 std::function<void()> createAdminSessionFromSecureConnectionAsync(std::function<void(std::optional<::IceGrid::AdminSessionPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
426
427 /// @private
428 void _iceI_createAdminSessionFromSecureConnection(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<AdminSessionPrx>>>&, const Ice::Context&) const;
429
430 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
431 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
432 /// a session alive in the IceGrid registry.
433 /// @param context The request context.
434 /// @return The session timeout (in seconds).
435 [[deprecated]] std::int32_t getSessionTimeout(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
436
437 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
438 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
439 /// a session alive in the IceGrid registry.
440 /// @param context The request context.
441 /// @return A future that becomes available when the invocation completes. This future holds:
442 /// - The session timeout (in seconds).
443 [[deprecated]] [[nodiscard]] std::future<std::int32_t> getSessionTimeoutAsync(const Ice::Context& context = Ice::noExplicitContext) const;
444
445 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
446 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
447 /// a session alive in the IceGrid registry.
448 /// @param response The response callback. It accepts:
449 /// - The session timeout (in seconds).
450 /// @param exception The exception callback.
451 /// @param sent The sent callback.
452 /// @param context The request context.
453 /// @return A function that can be called to cancel the invocation locally.
454 // NOLINTNEXTLINE(modernize-use-nodiscard)
455 [[deprecated]] 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;
456
457 /// @private
458 void _iceI_getSessionTimeout(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int32_t>>&, const Ice::Context&) const;
459
460 /// Gets the type ID of the associated Slice interface.
461 /// @return The string `"::IceGrid::Registry"`.
462 static const char* ice_staticId() noexcept;
463
464 /// @private
465 static RegistryPrx _fromReference(IceInternal::ReferencePtr ref) { return RegistryPrx{std::move(ref)}; }
466
467 protected:
468 /// @private
469 RegistryPrx() = default;
470
471 /// @private
472 explicit RegistryPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
473 {
474 }
475 };
476
477 /// Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
478 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::Locator`.
479 /// @headerfile IceGrid/IceGrid.h
480 class ICEGRID_API LocatorPrx : public Ice::Proxy<LocatorPrx, ::Ice::LocatorPrx>
481 {
482 public:
483#if defined(__GNUC__) && !defined(__clang__)
484# pragma GCC diagnostic push
485# pragma GCC diagnostic ignored "-Wextra" // initialize all virtual bases in correct order
486#endif
487
488 /// Constructs a proxy from a Communicator and a proxy string.
489 /// @param communicator The communicator of the new proxy.
490 /// @param proxyString The proxy string to parse.
491 LocatorPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
492
493 /// Copy constructor. Constructs with a copy of the contents of @p other.
494 /// @param other The proxy to copy from.
495 LocatorPrx(const LocatorPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
496
497 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
498 /// @param other The proxy to move from.
499 LocatorPrx(LocatorPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
500
501 ~LocatorPrx() override;
502
503 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
504 /// @param rhs The proxy to copy from.
505 /// @return A reference to this proxy.
506 LocatorPrx& operator=(const LocatorPrx& rhs) noexcept
507 {
508 if (this != &rhs)
509 {
511 }
512 return *this;
513 }
514
515 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
516 /// @param rhs The proxy to move from.
518 {
519 if (this != &rhs)
520 {
521 Ice::ObjectPrx::operator=(std::move(rhs));
522 }
523 return *this;
524 }
525
526 /// Gets a proxy to the registry object hosted by this IceGrid registry.
527 /// @param context The request context.
528 /// @return A proxy to the registry object. This proxy is never null.
529 std::optional<RegistryPrx> getLocalRegistry(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
530
531 /// Gets a proxy to the registry object hosted by this IceGrid registry.
532 /// @param context The request context.
533 /// @return A future that becomes available when the invocation completes. This future holds:
534 /// - A proxy to the registry object. This proxy is never null.
535 [[nodiscard]] std::future<std::optional<RegistryPrx>> getLocalRegistryAsync(const Ice::Context& context = Ice::noExplicitContext) const;
536
537 /// Gets a proxy to the registry object hosted by this IceGrid registry.
538 /// @param response The response callback. It accepts:
539 /// - A proxy to the registry object. This proxy is never null.
540 /// @param exception The exception callback.
541 /// @param sent The sent callback.
542 /// @param context The request context.
543 /// @return A function that can be called to cancel the invocation locally.
544 // NOLINTNEXTLINE(modernize-use-nodiscard)
545 std::function<void()> getLocalRegistryAsync(std::function<void(std::optional<::IceGrid::RegistryPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
546
547 /// @private
548 void _iceI_getLocalRegistry(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<RegistryPrx>>>&, const Ice::Context&) const;
549
550 /// Gets a proxy to the query object hosted by this IceGrid registry.
551 /// @param context The request context.
552 /// @return A proxy to the query object. This proxy is never null.
553 std::optional<QueryPrx> getLocalQuery(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
554
555 /// Gets a proxy to the query object hosted by this IceGrid registry.
556 /// @param context The request context.
557 /// @return A future that becomes available when the invocation completes. This future holds:
558 /// - A proxy to the query object. This proxy is never null.
559 [[nodiscard]] std::future<std::optional<QueryPrx>> getLocalQueryAsync(const Ice::Context& context = Ice::noExplicitContext) const;
560
561 /// Gets a proxy to the query object hosted by this IceGrid registry.
562 /// @param response The response callback. It accepts:
563 /// - A proxy to the query object. This proxy is never null.
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()> getLocalQueryAsync(std::function<void(std::optional<::IceGrid::QueryPrx>)> 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_getLocalQuery(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<QueryPrx>>>&, const Ice::Context&) const;
573
574 /// Gets the type ID of the associated Slice interface.
575 /// @return The string `"::IceGrid::Locator"`.
576 static const char* ice_staticId() noexcept;
577
578 /// @private
579 static LocatorPrx _fromReference(IceInternal::ReferencePtr ref) { return LocatorPrx{std::move(ref)}; }
580
581 protected:
582 /// @private
583 LocatorPrx() = default;
584
585 /// @private
586 explicit LocatorPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
587 {
588 }
589
590#if defined(__GNUC__) && !defined(__clang__)
591# pragma GCC diagnostic pop
592#endif
593 };
594}
595
596namespace IceGrid
597{
598 /// Finds well-known Ice objects registered with the IceGrid registry.
599 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Query`.
600 /// @headerfile IceGrid/IceGrid.h
601 class ICEGRID_API Query : public virtual Ice::Object
602 {
603 public:
604 /// The associated proxy type.
605 using ProxyType = QueryPrx;
606
607 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
608 /// @param request The incoming request.
609 /// @param sendResponse The callback to send the response.
610 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
611
612 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
613
614 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
615
616 /// Finds a well-known object by identity.
617 /// @param id The identity.
618 /// @param current The Current object of the incoming request.
619 /// @return A proxy to the well-known object, or null if no such object is registered.
620 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectById(::Ice::Identity id, const Ice::Current& current) const = 0;
621
622 /// @private
623 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
624
625 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
626 /// randomly selected.
627 /// @param type The object type.
628 /// @param current The Current object of the incoming request.
629 /// @return A proxy to a well-known object with the specified type, or null if no such object is registered.
630 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectByType(std::string type, const Ice::Current& current) const = 0;
631
632 /// @private
633 void _iceD_findObjectByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
634
635 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
636 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
637 /// object is hosted on a node that has a load average of 1.0.
638 /// @param type The object type.
639 /// @param sample The sampling interval.
640 /// @param current The Current object of the incoming request.
641 /// @return A proxy to the well-known object, or null if no such object is registered.
642 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectByTypeOnLeastLoadedNode(std::string type, LoadSample sample, const Ice::Current& current) const = 0;
643
644 /// @private
645 void _iceD_findObjectByTypeOnLeastLoadedNode(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
646
647 /// Finds all the well-known objects with the given type.
648 /// @param type The object type.
649 /// @param current The Current object of the incoming request.
650 /// @return A list of proxies to the well-known objects with the specified type. Can be empty.
651 [[nodiscard]] virtual ::Ice::ObjectProxySeq findAllObjectsByType(std::string type, const Ice::Current& current) const = 0;
652
653 /// @private
654 void _iceD_findAllObjectsByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
655
656 /// Finds all the replicas of a well-known object.
657 /// @param proxy A proxy that identifies the well-known object.
658 /// @param current The Current object of the incoming request.
659 /// @return A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
660 [[nodiscard]] virtual ::Ice::ObjectProxySeq findAllReplicas(std::optional<Ice::ObjectPrx> proxy, const Ice::Current& current) const = 0;
661
662 /// @private
663 void _iceD_findAllReplicas(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
664
665 /// Gets the type ID of the associated Slice interface.
666 /// @return The string `"::IceGrid::Query"`.
667 static const char* ice_staticId() noexcept;
668 };
669
670 /// A shared pointer to a Query.
671 using QueryPtr = std::shared_ptr<Query>;
672
673 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
674 /// with the registry.
675 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Registry`.
676 /// @headerfile IceGrid/IceGrid.h
677 class ICEGRID_API Registry : public virtual Ice::Object
678 {
679 public:
680 /// The associated proxy type.
681 using ProxyType = RegistryPrx;
682
683 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
684 /// @param request The incoming request.
685 /// @param sendResponse The callback to send the response.
686 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
687
688 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
689
690 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
691
692 /// Creates a client session.
693 /// @param userId The user ID.
694 /// @param password The password for the given user.
695 /// @param current The Current object of the incoming request.
696 /// @return A proxy to the newly created session. This proxy is never null.
697 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
698 virtual std::optional<SessionPrx> createSession(std::string userId, std::string password, const Ice::Current& current) = 0;
699
700 /// @private
701 void _iceD_createSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
702
703 /// Creates an administrative session.
704 /// @param userId The user ID.
705 /// @param password The password for the given user.
706 /// @param current The Current object of the incoming request.
707 /// @return A proxy to the newly created session. This proxy is never null.
708 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
709 virtual std::optional<AdminSessionPrx> createAdminSession(std::string userId, std::string password, const Ice::Current& current) = 0;
710
711 /// @private
712 void _iceD_createAdminSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
713
714 /// Creates a client session from a secure connection.
715 /// @param current The Current object of the incoming request.
716 /// @return A proxy to the newly created session. This proxy is never null.
717 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
718 virtual std::optional<SessionPrx> createSessionFromSecureConnection(const Ice::Current& current) = 0;
719
720 /// @private
721 void _iceD_createSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
722
723 /// Creates an administrative session from a secure connection.
724 /// @param current The Current object of the incoming request.
725 /// @return A proxy to the newly created session. This proxy is never null.
726 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
727 virtual std::optional<AdminSessionPrx> createAdminSessionFromSecureConnection(const Ice::Current& current) = 0;
728
729 /// @private
730 void _iceD_createAdminSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
731
732 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
733 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
734 /// a session alive in the IceGrid registry.
735 /// @param current The Current object of the incoming request.
736 /// @return The session timeout (in seconds).
737 [[nodiscard]] virtual std::int32_t getSessionTimeout(const Ice::Current& current) const = 0;
738
739 /// @private
740 void _iceD_getSessionTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
741
742 /// Gets the type ID of the associated Slice interface.
743 /// @return The string `"::IceGrid::Registry"`.
744 static const char* ice_staticId() noexcept;
745 };
746
747 /// A shared pointer to a Registry.
748 using RegistryPtr = std::shared_ptr<Registry>;
749
750 /// Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
751 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Locator`.
752 /// @headerfile IceGrid/IceGrid.h
753 class ICEGRID_API Locator : public virtual ::Ice::Locator
754 {
755 public:
756 /// The associated proxy type.
757 using ProxyType = LocatorPrx;
758
759 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
760 /// @param request The incoming request.
761 /// @param sendResponse The callback to send the response.
762 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
763
764 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
765
766 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
767
768 /// Gets a proxy to the registry object hosted by this IceGrid registry.
769 /// @param current The Current object of the incoming request.
770 /// @return A proxy to the registry object. This proxy is never null.
771 [[nodiscard]] virtual std::optional<RegistryPrx> getLocalRegistry(const Ice::Current& current) const = 0;
772
773 /// @private
774 void _iceD_getLocalRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
775
776 /// Gets a proxy to the query object hosted by this IceGrid registry.
777 /// @param current The Current object of the incoming request.
778 /// @return A proxy to the query object. This proxy is never null.
779 [[nodiscard]] virtual std::optional<QueryPrx> getLocalQuery(const Ice::Current& current) const = 0;
780
781 /// @private
782 void _iceD_getLocalQuery(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
783
784 /// Gets the type ID of the associated Slice interface.
785 /// @return The string `"::IceGrid::Locator"`.
786 static const char* ice_staticId() noexcept;
787 };
788
789 /// A shared pointer to a Locator.
790 using LocatorPtr = std::shared_ptr<Locator>;
791}
792
793namespace IceGrid
794{
795 /// Finds well-known Ice objects registered with the IceGrid registry.
796 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Query`.
797 /// @headerfile IceGrid/IceGrid.h
798 class ICEGRID_API AsyncQuery : public virtual Ice::Object
799 {
800 public:
801 /// The associated proxy type.
803
804 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
805 /// @param request The incoming request.
806 /// @param sendResponse The callback to send the response.
807 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
808
809 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
810
811 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
812
813 /// Finds a well-known object by identity.
814 /// @param id The identity.
815 /// @param response The response callback. It accepts:
816 /// - A proxy to the well-known object, or null if no such object is registered.
817 /// @param exception The exception callback.
818 /// @param current The Current object of the incoming request.
819 virtual void findObjectByIdAsync(::Ice::Identity id, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
820
821 /// @private
822 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
823
824 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
825 /// randomly selected.
826 /// @param type The object type.
827 /// @param response The response callback. It accepts:
828 /// - A proxy to a well-known object with the specified type, or null if no such object is registered.
829 /// @param exception The exception callback.
830 /// @param current The Current object of the incoming request.
831 virtual void findObjectByTypeAsync(std::string type, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
832
833 /// @private
834 void _iceD_findObjectByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
835
836 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
837 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
838 /// object is hosted on a node that has a load average of 1.0.
839 /// @param type The object type.
840 /// @param sample The sampling interval.
841 /// @param response The response callback. It accepts:
842 /// - A proxy to the well-known object, or null if no such object is registered.
843 /// @param exception The exception callback.
844 /// @param current The Current object of the incoming request.
845 virtual void findObjectByTypeOnLeastLoadedNodeAsync(std::string type, LoadSample sample, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
846
847 /// @private
848 void _iceD_findObjectByTypeOnLeastLoadedNode(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
849
850 /// Finds all the well-known objects with the given type.
851 /// @param type The object type.
852 /// @param response The response callback. It accepts:
853 /// - A list of proxies to the well-known objects with the specified type. Can be empty.
854 /// @param exception The exception callback.
855 /// @param current The Current object of the incoming request.
856 virtual void findAllObjectsByTypeAsync(std::string type, std::function<void(const ::Ice::ObjectProxySeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
857
858 /// @private
859 void _iceD_findAllObjectsByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
860
861 /// Finds all the replicas of a well-known object.
862 /// @param proxy A proxy that identifies the well-known object.
863 /// @param response The response callback. It accepts:
864 /// - A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
865 /// @param exception The exception callback.
866 /// @param current The Current object of the incoming request.
867 virtual void findAllReplicasAsync(std::optional<Ice::ObjectPrx> proxy, std::function<void(const ::Ice::ObjectProxySeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
868
869 /// @private
870 void _iceD_findAllReplicas(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
871
872 /// Gets the type ID of the associated Slice interface.
873 /// @return The string `"::IceGrid::Query"`.
874 static const char* ice_staticId() noexcept;
875 };
876
877 /// A shared pointer to an AsyncQuery.
878 using AsyncQueryPtr = std::shared_ptr<AsyncQuery>;
879
880 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
881 /// with the registry.
882 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Registry`.
883 /// @headerfile IceGrid/IceGrid.h
884 class ICEGRID_API AsyncRegistry : public virtual Ice::Object
885 {
886 public:
887 /// The associated proxy type.
889
890 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
891 /// @param request The incoming request.
892 /// @param sendResponse The callback to send the response.
893 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
894
895 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
896
897 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
898
899 /// Creates a client session.
900 /// @param userId The user ID.
901 /// @param password The password for the given user.
902 /// @param response The response callback. It accepts:
903 /// - A proxy to the newly created session. This proxy is never null.
904 /// @param exception The exception callback.
905 /// @param current The Current object of the incoming request.
906 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
907 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;
908
909 /// @private
910 void _iceD_createSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
911
912 /// Creates an administrative session.
913 /// @param userId The user ID.
914 /// @param password The password for the given user.
915 /// @param response The response callback. It accepts:
916 /// - A proxy to the newly created session. This proxy is never null.
917 /// @param exception The exception callback.
918 /// @param current The Current object of the incoming request.
919 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
920 virtual void createAdminSessionAsync(std::string userId, std::string password, std::function<void(const std::optional<AdminSessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
921
922 /// @private
923 void _iceD_createAdminSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
924
925 /// Creates a client session from a secure connection.
926 /// @param response The response callback. It accepts:
927 /// - A proxy to the newly created session. This proxy is never null.
928 /// @param exception The exception callback.
929 /// @param current The Current object of the incoming request.
930 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
931 virtual void createSessionFromSecureConnectionAsync(std::function<void(const std::optional<SessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
932
933 /// @private
934 void _iceD_createSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
935
936 /// Creates an administrative session from a secure connection.
937 /// @param response The response callback. It accepts:
938 /// - A proxy to the newly created session. This proxy is never null.
939 /// @param exception The exception callback.
940 /// @param current The Current object of the incoming request.
941 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
942 virtual void createAdminSessionFromSecureConnectionAsync(std::function<void(const std::optional<AdminSessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
943
944 /// @private
945 void _iceD_createAdminSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
946
947 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
948 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
949 /// a session alive in the IceGrid registry.
950 /// @param response The response callback. It accepts:
951 /// - The session timeout (in seconds).
952 /// @param exception The exception callback.
953 /// @param current The Current object of the incoming request.
954 virtual void getSessionTimeoutAsync(std::function<void(std::int32_t returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
955
956 /// @private
957 void _iceD_getSessionTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
958
959 /// Gets the type ID of the associated Slice interface.
960 /// @return The string `"::IceGrid::Registry"`.
961 static const char* ice_staticId() noexcept;
962 };
963
964 /// A shared pointer to an AsyncRegistry.
965 using AsyncRegistryPtr = std::shared_ptr<AsyncRegistry>;
966
967 /// Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
968 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Locator`.
969 /// @headerfile IceGrid/IceGrid.h
970 class ICEGRID_API AsyncLocator : public virtual ::Ice::AsyncLocator
971 {
972 public:
973 /// The associated proxy type.
975
976 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
977 /// @param request The incoming request.
978 /// @param sendResponse The callback to send the response.
979 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
980
981 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
982
983 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
984
985 /// Gets a proxy to the registry object hosted by this IceGrid registry.
986 /// @param response The response callback. It accepts:
987 /// - A proxy to the registry object. This proxy is never null.
988 /// @param exception The exception callback.
989 /// @param current The Current object of the incoming request.
990 virtual void getLocalRegistryAsync(std::function<void(const std::optional<RegistryPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
991
992 /// @private
993 void _iceD_getLocalRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
994
995 /// Gets a proxy to the query object hosted by this IceGrid registry.
996 /// @param response The response callback. It accepts:
997 /// - A proxy to the query object. This proxy is never null.
998 /// @param exception The exception callback.
999 /// @param current The Current object of the incoming request.
1000 virtual void getLocalQueryAsync(std::function<void(const std::optional<QueryPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1001
1002 /// @private
1003 void _iceD_getLocalQuery(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1004
1005 /// Gets the type ID of the associated Slice interface.
1006 /// @return The string `"::IceGrid::Locator"`.
1007 static const char* ice_staticId() noexcept;
1008 };
1009
1010 /// A shared pointer to an AsyncLocator.
1011 using AsyncLocatorPtr = std::shared_ptr<AsyncLocator>;
1012}
1013
1014namespace Ice
1015{
1016 /// @cond INTERNAL
1017 template<>
1018 struct StreamableTraits<::IceGrid::LoadSample>
1019 {
1020 static constexpr StreamHelperCategory helper = StreamHelperCategoryEnum;
1021 static constexpr int minValue = 0;
1022 static constexpr int maxValue = 2;
1023 static constexpr int minWireSize = 1;
1024 static constexpr bool fixedLength = false;
1025 };
1026 /// @endcond
1027}
1028
1029// NOLINTEND(modernize-concat-nested-namespaces)
1030
1031#include <Ice/PopDisableWarnings.h>
1032#endif
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void getLocalRegistryAsync(std::function< void(const std::optional< RegistryPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets a proxy to the registry object hosted by this IceGrid registry.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
LocatorPrx ProxyType
The associated proxy type.
Definition Registry.h:974
virtual void getLocalQueryAsync(std::function< void(const std::optional< QueryPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets a proxy to the query object hosted by this IceGrid registry.
Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
Definition Registry.h:971
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual void findObjectByTypeAsync(std::string type, std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Finds a well-known object by type.
virtual void findAllReplicasAsync(std::optional< Ice::ObjectPrx > proxy, std::function< void(const ::Ice::ObjectProxySeq &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Finds all the replicas of a well-known 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 Slice type IDs.
virtual void findObjectByTypeOnLeastLoadedNodeAsync(std::string type, LoadSample sample, std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Finds a well-known object by type on the least-loaded node.
QueryPrx ProxyType
The associated proxy type.
Definition Registry.h:802
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void findObjectByIdAsync(::Ice::Identity id, std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Finds a well-known object by identity.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void findAllObjectsByTypeAsync(std::string type, std::function< void(const ::Ice::ObjectProxySeq &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Finds all the well-known objects with the given type.
Finds well-known Ice objects registered with the IceGrid registry.
Definition Registry.h:799
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void createAdminSessionAsync(std::string userId, std::string password, std::function< void(const std::optional< AdminSessionPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Creates an administrative session.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual void createSessionFromSecureConnectionAsync(std::function< void(const std::optional< SessionPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Creates a client session from a secure connection.
RegistryPrx ProxyType
The associated proxy type.
Definition Registry.h:888
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
Creates a client session.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void getSessionTimeoutAsync(std::function< void(std::int32_t returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets the session timeout.
virtual void createAdminSessionFromSecureConnectionAsync(std::function< void(const std::optional< AdminSessionPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Creates an administrative session from a secure connection.
Represents the main entry point into the IceGrid registry service.
Definition Registry.h:885
std::function< void()> getLocalQueryAsync(std::function< void(std::optional<::IceGrid::QueryPrx >)> 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 query object hosted by this IceGrid registry.
std::optional< QueryPrx > getLocalQuery(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the query object hosted by this IceGrid registry.
LocatorPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Registry.h:491
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
LocatorPrx(const LocatorPrx &other) noexcept
Copy constructor.
Definition Registry.h:495
LocatorPrx & operator=(LocatorPrx &&rhs) noexcept
Move assignment operator.
Definition Registry.h:517
std::optional< RegistryPrx > getLocalRegistry(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the registry object hosted by this IceGrid registry.
LocatorPrx & operator=(const LocatorPrx &rhs) noexcept
Copy assignment operator.
Definition Registry.h:506
std::function< void()> getLocalRegistryAsync(std::function< void(std::optional<::IceGrid::RegistryPrx >)> 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 registry object hosted by this IceGrid registry.
std::future< std::optional< RegistryPrx > > getLocalRegistryAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the registry object hosted by this IceGrid registry.
LocatorPrx(LocatorPrx &&other) noexcept
Move constructor.
Definition Registry.h:499
std::future< std::optional< QueryPrx > > getLocalQueryAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the query object hosted by this IceGrid registry.
Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
Definition Registry.h:481
std::optional< Ice::ObjectPrx > findObjectById(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by identity.
std::future<::Ice::ObjectProxySeq > findAllObjectsByTypeAsync(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the well-known objects with the given type.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< std::optional< Ice::ObjectPrx > > findObjectByIdAsync(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by identity.
std::optional< Ice::ObjectPrx > findObjectByType(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type.
std::future< std::optional< Ice::ObjectPrx > > findObjectByTypeAsync(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type.
::Ice::ObjectProxySeq findAllObjectsByType(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the well-known objects with the given type.
std::function< void()> findObjectByIdAsync(const ::Ice::Identity &id, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by identity.
std::function< void()> findObjectByTypeAsync(std::string_view type, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type.
QueryPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Registry.h:74
QueryPrx(const QueryPrx &other) noexcept
Copy constructor.
Definition Registry.h:78
std::function< void()> findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type on the least-loaded node.
std::optional< Ice::ObjectPrx > findObjectByTypeOnLeastLoadedNode(std::string_view type, LoadSample sample, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type on the least-loaded node.
std::function< void()> findAllReplicasAsync(const std::optional< Ice::ObjectPrx > &proxy, std::function< void(::Ice::ObjectProxySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the replicas of a well-known object.
std::future<::Ice::ObjectProxySeq > findAllReplicasAsync(const std::optional< Ice::ObjectPrx > &proxy, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the replicas of a well-known object.
QueryPrx(QueryPrx &&other) noexcept
Move constructor.
Definition Registry.h:82
QueryPrx & operator=(QueryPrx &&rhs) noexcept
Move assignment operator.
Definition Registry.h:100
QueryPrx & operator=(const QueryPrx &rhs) noexcept
Copy assignment operator.
Definition Registry.h:89
std::future< std::optional< Ice::ObjectPrx > > findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type on the least-loaded node.
::Ice::ObjectProxySeq findAllReplicas(const std::optional< Ice::ObjectPrx > &proxy, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the replicas of a well-known object.
std::function< void()> findAllObjectsByTypeAsync(std::string_view type, std::function< void(::Ice::ObjectProxySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the well-known objects with the given type.
Finds well-known Ice objects registered with the IceGrid registry.
Definition Registry.h:69
RegistryPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Registry.h:283
std::function< void()> createSessionAsync(std::string_view userId, std::string_view password, std::function< void(std::optional<::IceGrid::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 client session.
std::future< std::optional< SessionPrx > > createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session.
RegistryPrx & operator=(const RegistryPrx &rhs) noexcept
Copy assignment operator.
Definition Registry.h:298
std::future< std::int32_t > getSessionTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::function< void()> createSessionFromSecureConnectionAsync(std::function< void(std::optional<::IceGrid::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 client session from a secure connection.
std::optional< SessionPrx > createSession(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::function< void()> createAdminSessionAsync(std::string_view userId, std::string_view password, std::function< void(std::optional<::IceGrid::AdminSessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session.
RegistryPrx(RegistryPrx &&other) noexcept
Move constructor.
Definition Registry.h:291
std::future< std::optional< SessionPrx > > createSessionFromSecureConnectionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session from a secure connection.
std::int32_t getSessionTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::function< void()> createAdminSessionFromSecureConnectionAsync(std::function< void(std::optional<::IceGrid::AdminSessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session from a secure connection.
std::optional< AdminSessionPrx > createAdminSessionFromSecureConnection(const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session from a secure connection.
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::future< std::optional< AdminSessionPrx > > createAdminSessionFromSecureConnectionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session from a secure connection.
std::future< std::optional< AdminSessionPrx > > createAdminSessionAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session.
RegistryPrx(const RegistryPrx &other) noexcept
Copy constructor.
Definition Registry.h:287
std::optional< SessionPrx > createSessionFromSecureConnection(const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session from a secure connection.
std::optional< AdminSessionPrx > createAdminSession(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session.
RegistryPrx & operator=(RegistryPrx &&rhs) noexcept
Move assignment operator.
Definition Registry.h:309
Represents the main entry point into the IceGrid registry service.
Definition Registry.h:278
Represents a request received by a connection.
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.h:331
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
LoadSample
Determines which load sampling interval to use.
Definition Registry.h:39
@ LoadSample5
Sample every five minutes.
Definition Registry.h:44
@ LoadSample15
Sample every fifteen minutes.
Definition Registry.h:47
@ LoadSample1
Sample every minute.
Definition Registry.h:41
std::ostream & operator<<(std::ostream &os, ServerState value)
Outputs the enumerator name or underlying value of a ServerState to a stream.
std::shared_ptr< AsyncRegistry > AsyncRegistryPtr
A shared pointer to an AsyncRegistry.
Definition Registry.h:965
std::shared_ptr< Locator > LocatorPtr
A shared pointer to a Locator.
Definition Registry.h:790
std::shared_ptr< AsyncQuery > AsyncQueryPtr
A shared pointer to an AsyncQuery.
Definition Registry.h:878
std::shared_ptr< Query > QueryPtr
A shared pointer to a Query.
Definition Registry.h:671
std::shared_ptr< Registry > RegistryPtr
A shared pointer to a Registry.
Definition Registry.h:748
std::shared_ptr< AsyncLocator > AsyncLocatorPtr
A shared pointer to an AsyncLocator.
Definition Registry.h:1011
Deploy and manage Ice servers.
Definition Admin.h:34
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::vector< std::optional< Ice::ObjectPrx > > ObjectProxySeq
A sequence of object proxies.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:28
The Ice RPC framework.
Definition SampleEvent.h:60
Provides information about an incoming request being dispatched.
Definition Current.h:18
Represents the identity of an Ice object.
Definition Identity.h:41