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