Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Registry.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.3
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 < 3
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. The Ice runtime calls this function from an Ice thread pool
131 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
132 /// function. It accepts:
133 /// - A proxy to the well-known object, or null if no such object is registered.
134 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
135 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
136 /// function.
137 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
138 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
139 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
140 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
141 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
142 /// asynchronous case.
143 /// @param context The request context.
144 /// @return A function that can be called to cancel the invocation locally.
145 // NOLINTNEXTLINE(modernize-use-nodiscard)
146 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;
147
148 /// @private
149 void _iceI_findObjectById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const ::Ice::Identity&, const Ice::Context&) 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 context The request context.
155 /// @return A proxy to a well-known object with the specified type, or null if no such object is registered.
156 std::optional<Ice::ObjectPrx> findObjectByType(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
157
158 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
159 /// randomly selected.
160 /// @param type The object type.
161 /// @param context The request context.
162 /// @return A future that becomes available when the invocation completes. This future holds:
163 /// - A proxy to a well-known object with the specified type, or null if no such object is registered.
164 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByTypeAsync(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const;
165
166 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
167 /// randomly selected.
168 /// @param type The object type.
169 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
170 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
171 /// function. It accepts:
172 /// - A proxy to a well-known object with the specified type, or null if no such object is registered.
173 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
174 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
175 /// function.
176 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
177 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
178 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
179 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
180 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
181 /// asynchronous case.
182 /// @param context The request context.
183 /// @return A function that can be called to cancel the invocation locally.
184 // NOLINTNEXTLINE(modernize-use-nodiscard)
185 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;
186
187 /// @private
188 void _iceI_findObjectByType(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, const Ice::Context&) const;
189
190 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
191 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
192 /// object is hosted on a node that has a load average of 1.0.
193 /// @param type The object type.
194 /// @param sample The sampling interval.
195 /// @param context The request context.
196 /// @return A proxy to the well-known object, or null if no such object is registered.
197 std::optional<Ice::ObjectPrx> findObjectByTypeOnLeastLoadedNode(std::string_view type, LoadSample sample, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
198
199 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
200 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
201 /// object is hosted on a node that has a load average of 1.0.
202 /// @param type The object type.
203 /// @param sample The sampling interval.
204 /// @param context The request context.
205 /// @return A future that becomes available when the invocation completes. This future holds:
206 /// - A proxy to the well-known object, or null if no such object is registered.
207 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, const Ice::Context& context = Ice::noExplicitContext) const;
208
209 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
210 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
211 /// object is hosted on a node that has a load average of 1.0.
212 /// @param type The object type.
213 /// @param sample The sampling interval.
214 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
215 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
216 /// function. It accepts:
217 /// - A proxy to the well-known object, or null if no such object is registered.
218 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
219 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
220 /// function.
221 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
222 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
223 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
224 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
225 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
226 /// asynchronous case.
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()> 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;
231
232 /// @private
233 void _iceI_findObjectByTypeOnLeastLoadedNode(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, LoadSample, const Ice::Context&) const;
234
235 /// Finds all the well-known objects with the given type.
236 /// @param type The object type.
237 /// @param context The request context.
238 /// @return A list of proxies to the well-known objects with the specified type. Can be empty.
239 ::Ice::ObjectProxySeq findAllObjectsByType(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
240
241 /// Finds all the well-known objects with the given type.
242 /// @param type The object type.
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 well-known objects with the specified type. Can be empty.
246 [[nodiscard]] std::future<::Ice::ObjectProxySeq> findAllObjectsByTypeAsync(std::string_view type, const Ice::Context& context = Ice::noExplicitContext) const;
247
248 /// Finds all the well-known objects with the given type.
249 /// @param type The object type.
250 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
251 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
252 /// function. It accepts:
253 /// - A list of proxies to the well-known objects with the specified type. Can be empty.
254 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
255 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
256 /// function.
257 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
258 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
259 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
260 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
261 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
262 /// asynchronous case.
263 /// @param context The request context.
264 /// @return A function that can be called to cancel the invocation locally.
265 // NOLINTNEXTLINE(modernize-use-nodiscard)
266 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;
267
268 /// @private
269 void _iceI_findAllObjectsByType(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::ObjectProxySeq>>&, std::string_view, const Ice::Context&) const;
270
271 /// Finds all the replicas of a well-known object.
272 /// @param proxy A proxy that identifies the well-known object.
273 /// @param context The request context.
274 /// @return A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
275 ::Ice::ObjectProxySeq findAllReplicas(const std::optional<Ice::ObjectPrx>& proxy, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
276
277 /// Finds all the replicas of a well-known object.
278 /// @param proxy A proxy that identifies the well-known object.
279 /// @param context The request context.
280 /// @return A future that becomes available when the invocation completes. This future holds:
281 /// - A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
282 [[nodiscard]] std::future<::Ice::ObjectProxySeq> findAllReplicasAsync(const std::optional<Ice::ObjectPrx>& proxy, const Ice::Context& context = Ice::noExplicitContext) const;
283
284 /// Finds all the replicas of a well-known object.
285 /// @param proxy A proxy that identifies the well-known object.
286 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
287 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
288 /// function. It accepts:
289 /// - A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
290 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
291 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
292 /// function.
293 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
294 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
295 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
296 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
297 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
298 /// asynchronous case.
299 /// @param context The request context.
300 /// @return A function that can be called to cancel the invocation locally.
301 // NOLINTNEXTLINE(modernize-use-nodiscard)
302 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;
303
304 /// @private
305 void _iceI_findAllReplicas(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::ObjectProxySeq>>&, const std::optional<Ice::ObjectPrx>&, const Ice::Context&) const;
306
307 /// Gets the type ID of the associated Slice interface.
308 /// @return The string `"::IceGrid::Query"`.
309 static const char* ice_staticId() noexcept;
310
311 /// @private
312 static QueryPrx _fromReference(IceInternal::ReferencePtr ref) { return QueryPrx{std::move(ref)}; }
313
314 protected:
315 /// @private
316 QueryPrx() = default;
317
318 /// @private
319 explicit QueryPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
320 {
321 }
322 };
323
324 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
325 /// with the registry.
326 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::Registry`.
327 /// @headerfile IceGrid/IceGrid.h
328 class ICEGRID_API RegistryPrx : public Ice::Proxy<RegistryPrx, Ice::ObjectPrx>
329 {
330 public:
331 /// Constructs a proxy from a Communicator and a proxy string.
332 /// @param communicator The communicator of the new proxy.
333 /// @param proxyString The proxy string to parse.
334 RegistryPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
335
336 /// Copy constructor. Constructs with a copy of the contents of @p other.
337 /// @param other The proxy to copy from.
338 RegistryPrx(const RegistryPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
339
340 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
341 /// @param other The proxy to move from.
342 RegistryPrx(RegistryPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
343
344 ~RegistryPrx() override;
345
346 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
347 /// @param rhs The proxy to copy from.
348 /// @return A reference to this proxy.
349 RegistryPrx& operator=(const RegistryPrx& rhs) noexcept
350 {
351 if (this != &rhs)
352 {
354 }
355 return *this;
356 }
357
358 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
359 /// @param rhs The proxy to move from.
361 {
362 if (this != &rhs)
363 {
364 Ice::ObjectPrx::operator=(std::move(rhs));
365 }
366 return *this;
367 }
368
369 /// Creates a client session.
370 /// @param userId The user ID.
371 /// @param password The password for the given user.
372 /// @param context The request context.
373 /// @return A proxy to the newly created session. This proxy is never null.
374 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
375 std::optional<SessionPrx> createSession(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
376
377 /// Creates a client session.
378 /// @param userId The user ID.
379 /// @param password The password for the given user.
380 /// @param context The request context.
381 /// @return A future that becomes available when the invocation completes. This future holds:
382 /// - A proxy to the newly created session. This proxy is never null.
383 [[nodiscard]] std::future<std::optional<SessionPrx>> createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const;
384
385 /// Creates a client session.
386 /// @param userId The user ID.
387 /// @param password The password for the given user.
388 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
389 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
390 /// function. It accepts:
391 /// - A proxy to the newly created session. This proxy is never null.
392 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
393 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
394 /// function.
395 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
396 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
397 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
398 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
399 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
400 /// asynchronous case.
401 /// @param context The request context.
402 /// @return A function that can be called to cancel the invocation locally.
403 // NOLINTNEXTLINE(modernize-use-nodiscard)
404 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;
405
406 /// @private
407 void _iceI_createSession(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, std::string_view, std::string_view, const Ice::Context&) const;
408
409 /// Creates an administrative session.
410 /// @param userId The user ID.
411 /// @param password The password for the given user.
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> createAdminSession(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
416
417 /// Creates an administrative session.
418 /// @param userId The user ID.
419 /// @param password The password for the given user.
420 /// @param context The request context.
421 /// @return A future that becomes available when the invocation completes. This future holds:
422 /// - A proxy to the newly created session. This proxy is never null.
423 [[nodiscard]] std::future<std::optional<AdminSessionPrx>> createAdminSessionAsync(std::string_view userId, std::string_view password, const Ice::Context& context = Ice::noExplicitContext) const;
424
425 /// Creates an administrative session.
426 /// @param userId The user ID.
427 /// @param password The password for the given user.
428 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
429 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
430 /// function. It accepts:
431 /// - A proxy to the newly created session. This proxy is never null.
432 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
433 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
434 /// function.
435 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
436 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
437 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
438 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
439 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
440 /// asynchronous case.
441 /// @param context The request context.
442 /// @return A function that can be called to cancel the invocation locally.
443 // NOLINTNEXTLINE(modernize-use-nodiscard)
444 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;
445
446 /// @private
447 void _iceI_createAdminSession(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<AdminSessionPrx>>>&, std::string_view, std::string_view, const Ice::Context&) const;
448
449 /// Creates a client session from a secure connection.
450 /// @param context The request context.
451 /// @return A proxy to the newly created session. This proxy is never null.
452 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
453 std::optional<SessionPrx> createSessionFromSecureConnection(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
454
455 /// Creates a client session from a secure connection.
456 /// @param context The request context.
457 /// @return A future that becomes available when the invocation completes. This future holds:
458 /// - A proxy to the newly created session. This proxy is never null.
459 [[nodiscard]] std::future<std::optional<SessionPrx>> createSessionFromSecureConnectionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
460
461 /// Creates a client session from a secure connection.
462 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
463 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
464 /// function. It accepts:
465 /// - A proxy to the newly created session. This proxy is never null.
466 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
467 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
468 /// function.
469 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
470 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
471 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
472 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
473 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
474 /// asynchronous case.
475 /// @param context The request context.
476 /// @return A function that can be called to cancel the invocation locally.
477 // NOLINTNEXTLINE(modernize-use-nodiscard)
478 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;
479
480 /// @private
481 void _iceI_createSessionFromSecureConnection(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, const Ice::Context&) const;
482
483 /// Creates an administrative session from a secure connection.
484 /// @param context The request context.
485 /// @return A proxy to the newly created session. This proxy is never null.
486 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
487 std::optional<AdminSessionPrx> createAdminSessionFromSecureConnection(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
488
489 /// Creates an administrative session from a secure connection.
490 /// @param context The request context.
491 /// @return A future that becomes available when the invocation completes. This future holds:
492 /// - A proxy to the newly created session. This proxy is never null.
493 [[nodiscard]] std::future<std::optional<AdminSessionPrx>> createAdminSessionFromSecureConnectionAsync(const Ice::Context& context = Ice::noExplicitContext) const;
494
495 /// Creates an administrative session from a secure connection.
496 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
497 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
498 /// function. It accepts:
499 /// - A proxy to the newly created session. This proxy is never null.
500 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
501 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
502 /// function.
503 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
504 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
505 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
506 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
507 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
508 /// asynchronous case.
509 /// @param context The request context.
510 /// @return A function that can be called to cancel the invocation locally.
511 // NOLINTNEXTLINE(modernize-use-nodiscard)
512 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;
513
514 /// @private
515 void _iceI_createAdminSessionFromSecureConnection(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<AdminSessionPrx>>>&, const Ice::Context&) const;
516
517 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
518 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
519 /// a session alive in the IceGrid registry.
520 /// @param context The request context.
521 /// @return The session timeout (in seconds).
522 [[deprecated]] std::int32_t getSessionTimeout(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
523
524 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
525 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
526 /// a session alive in the IceGrid registry.
527 /// @param context The request context.
528 /// @return A future that becomes available when the invocation completes. This future holds:
529 /// - The session timeout (in seconds).
530 [[deprecated]] [[nodiscard]] std::future<std::int32_t> getSessionTimeoutAsync(const Ice::Context& context = Ice::noExplicitContext) const;
531
532 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
533 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
534 /// a session alive in the IceGrid registry.
535 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
536 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
537 /// function. It accepts:
538 /// - The session timeout (in seconds).
539 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
540 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
541 /// function.
542 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
543 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
544 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
545 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
546 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
547 /// asynchronous case.
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 [[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;
552
553 /// @private
554 void _iceI_getSessionTimeout(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int32_t>>&, const Ice::Context&) const;
555
556 /// Gets the type ID of the associated Slice interface.
557 /// @return The string `"::IceGrid::Registry"`.
558 static const char* ice_staticId() noexcept;
559
560 /// @private
561 static RegistryPrx _fromReference(IceInternal::ReferencePtr ref) { return RegistryPrx{std::move(ref)}; }
562
563 protected:
564 /// @private
565 RegistryPrx() = default;
566
567 /// @private
568 explicit RegistryPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
569 {
570 }
571 };
572
573 /// Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
574 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::Locator`.
575 /// @headerfile IceGrid/IceGrid.h
576 class ICEGRID_API LocatorPrx : public Ice::Proxy<LocatorPrx, ::Ice::LocatorPrx>
577 {
578 public:
579#if defined(__GNUC__) && !defined(__clang__)
580# pragma GCC diagnostic push
581# pragma GCC diagnostic ignored "-Wextra" // initialize all virtual bases in correct order
582#endif
583
584 /// Constructs a proxy from a Communicator and a proxy string.
585 /// @param communicator The communicator of the new proxy.
586 /// @param proxyString The proxy string to parse.
587 LocatorPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
588
589 /// Copy constructor. Constructs with a copy of the contents of @p other.
590 /// @param other The proxy to copy from.
591 LocatorPrx(const LocatorPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
592
593 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
594 /// @param other The proxy to move from.
595 LocatorPrx(LocatorPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
596
597 ~LocatorPrx() override;
598
599 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
600 /// @param rhs The proxy to copy from.
601 /// @return A reference to this proxy.
602 LocatorPrx& operator=(const LocatorPrx& rhs) noexcept
603 {
604 if (this != &rhs)
605 {
607 }
608 return *this;
609 }
610
611 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
612 /// @param rhs The proxy to move from.
614 {
615 if (this != &rhs)
616 {
617 Ice::ObjectPrx::operator=(std::move(rhs));
618 }
619 return *this;
620 }
621
622 /// Gets a proxy to the registry object hosted by this IceGrid registry.
623 /// @param context The request context.
624 /// @return A proxy to the registry object. This proxy is never null.
625 std::optional<RegistryPrx> getLocalRegistry(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
626
627 /// Gets a proxy to the registry object hosted by this IceGrid registry.
628 /// @param context The request context.
629 /// @return A future that becomes available when the invocation completes. This future holds:
630 /// - A proxy to the registry object. This proxy is never null.
631 [[nodiscard]] std::future<std::optional<RegistryPrx>> getLocalRegistryAsync(const Ice::Context& context = Ice::noExplicitContext) const;
632
633 /// Gets a proxy to the registry object hosted by this IceGrid registry.
634 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
635 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
636 /// function. It accepts:
637 /// - A proxy to the registry object. This proxy is never null.
638 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
639 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
640 /// function.
641 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
642 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
643 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
644 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
645 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
646 /// asynchronous case.
647 /// @param context The request context.
648 /// @return A function that can be called to cancel the invocation locally.
649 // NOLINTNEXTLINE(modernize-use-nodiscard)
650 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;
651
652 /// @private
653 void _iceI_getLocalRegistry(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<RegistryPrx>>>&, const Ice::Context&) const;
654
655 /// Gets a proxy to the query object hosted by this IceGrid registry.
656 /// @param context The request context.
657 /// @return A proxy to the query object. This proxy is never null.
658 std::optional<QueryPrx> getLocalQuery(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
659
660 /// Gets a proxy to the query object hosted by this IceGrid registry.
661 /// @param context The request context.
662 /// @return A future that becomes available when the invocation completes. This future holds:
663 /// - A proxy to the query object. This proxy is never null.
664 [[nodiscard]] std::future<std::optional<QueryPrx>> getLocalQueryAsync(const Ice::Context& context = Ice::noExplicitContext) const;
665
666 /// Gets a proxy to the query object hosted by this IceGrid registry.
667 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
668 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
669 /// function. It accepts:
670 /// - A proxy to the query object. This proxy is never null.
671 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
672 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
673 /// function.
674 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
675 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
676 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
677 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
678 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
679 /// asynchronous case.
680 /// @param context The request context.
681 /// @return A function that can be called to cancel the invocation locally.
682 // NOLINTNEXTLINE(modernize-use-nodiscard)
683 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;
684
685 /// @private
686 void _iceI_getLocalQuery(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<QueryPrx>>>&, const Ice::Context&) const;
687
688 /// Gets the type ID of the associated Slice interface.
689 /// @return The string `"::IceGrid::Locator"`.
690 static const char* ice_staticId() noexcept;
691
692 /// @private
693 static LocatorPrx _fromReference(IceInternal::ReferencePtr ref) { return LocatorPrx{std::move(ref)}; }
694
695 protected:
696 /// @private
697 LocatorPrx() = default;
698
699 /// @private
700 explicit LocatorPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
701 {
702 }
703
704#if defined(__GNUC__) && !defined(__clang__)
705# pragma GCC diagnostic pop
706#endif
707 };
708}
709
710namespace IceGrid
711{
712 /// Finds well-known Ice objects registered with the IceGrid registry.
713 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Query`.
714 /// @headerfile IceGrid/IceGrid.h
715 class ICEGRID_API Query : public virtual Ice::Object
716 {
717 public:
718 /// The associated proxy type.
719 using ProxyType = QueryPrx;
720
721 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
722 /// @param request The incoming request.
723 /// @param sendResponse The callback to send the response.
724 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
725
726 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
727
728 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
729
730 /// Finds a well-known object by identity.
731 /// @param id The identity.
732 /// @param current The Current object of the incoming request.
733 /// @return A proxy to the well-known object, or null if no such object is registered.
734 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectById(::Ice::Identity id, const Ice::Current& current) const = 0;
735
736 /// @private
737 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
738
739 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
740 /// randomly selected.
741 /// @param type The object type.
742 /// @param current The Current object of the incoming request.
743 /// @return A proxy to a well-known object with the specified type, or null if no such object is registered.
744 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectByType(std::string type, const Ice::Current& current) const = 0;
745
746 /// @private
747 void _iceD_findObjectByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
748
749 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
750 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
751 /// object is hosted on a node that has a load average of 1.0.
752 /// @param type The object type.
753 /// @param sample The sampling interval.
754 /// @param current The Current object of the incoming request.
755 /// @return A proxy to the well-known object, or null if no such object is registered.
756 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectByTypeOnLeastLoadedNode(std::string type, LoadSample sample, const Ice::Current& current) const = 0;
757
758 /// @private
759 void _iceD_findObjectByTypeOnLeastLoadedNode(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
760
761 /// Finds all the well-known objects with the given type.
762 /// @param type The object type.
763 /// @param current The Current object of the incoming request.
764 /// @return A list of proxies to the well-known objects with the specified type. Can be empty.
765 [[nodiscard]] virtual ::Ice::ObjectProxySeq findAllObjectsByType(std::string type, const Ice::Current& current) const = 0;
766
767 /// @private
768 void _iceD_findAllObjectsByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
769
770 /// Finds all the replicas of a well-known object.
771 /// @param proxy A proxy that identifies the well-known object.
772 /// @param current The Current object of the incoming request.
773 /// @return A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
774 [[nodiscard]] virtual ::Ice::ObjectProxySeq findAllReplicas(std::optional<Ice::ObjectPrx> proxy, const Ice::Current& current) const = 0;
775
776 /// @private
777 void _iceD_findAllReplicas(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
778
779 /// Gets the type ID of the associated Slice interface.
780 /// @return The string `"::IceGrid::Query"`.
781 static const char* ice_staticId() noexcept;
782 };
783
784 /// A shared pointer to a Query.
785 using QueryPtr = std::shared_ptr<Query>;
786
787 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
788 /// with the registry.
789 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Registry`.
790 /// @headerfile IceGrid/IceGrid.h
791 class ICEGRID_API Registry : public virtual Ice::Object
792 {
793 public:
794 /// The associated proxy type.
795 using ProxyType = RegistryPrx;
796
797 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
798 /// @param request The incoming request.
799 /// @param sendResponse The callback to send the response.
800 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
801
802 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
803
804 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
805
806 /// Creates a client session.
807 /// @param userId The user ID.
808 /// @param password The password for the given user.
809 /// @param current The Current object of the incoming request.
810 /// @return A proxy to the newly created session. This proxy is never null.
811 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
812 virtual std::optional<SessionPrx> createSession(std::string userId, std::string password, const Ice::Current& current) = 0;
813
814 /// @private
815 void _iceD_createSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
816
817 /// Creates an administrative session.
818 /// @param userId The user ID.
819 /// @param password The password for the given user.
820 /// @param current The Current object of the incoming request.
821 /// @return A proxy to the newly created session. This proxy is never null.
822 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
823 virtual std::optional<AdminSessionPrx> createAdminSession(std::string userId, std::string password, const Ice::Current& current) = 0;
824
825 /// @private
826 void _iceD_createAdminSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
827
828 /// Creates a client session from a secure connection.
829 /// @param current The Current object of the incoming request.
830 /// @return A proxy to the newly created session. This proxy is never null.
831 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
832 virtual std::optional<SessionPrx> createSessionFromSecureConnection(const Ice::Current& current) = 0;
833
834 /// @private
835 void _iceD_createSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
836
837 /// Creates an administrative session from a secure connection.
838 /// @param current The Current object of the incoming request.
839 /// @return A proxy to the newly created session. This proxy is never null.
840 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
841 virtual std::optional<AdminSessionPrx> createAdminSessionFromSecureConnection(const Ice::Current& current) = 0;
842
843 /// @private
844 void _iceD_createAdminSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
845
846 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
847 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
848 /// a session alive in the IceGrid registry.
849 /// @param current The Current object of the incoming request.
850 /// @return The session timeout (in seconds).
851 [[nodiscard]] virtual std::int32_t getSessionTimeout(const Ice::Current& current) const = 0;
852
853 /// @private
854 void _iceD_getSessionTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
855
856 /// Gets the type ID of the associated Slice interface.
857 /// @return The string `"::IceGrid::Registry"`.
858 static const char* ice_staticId() noexcept;
859 };
860
861 /// A shared pointer to a Registry.
862 using RegistryPtr = std::shared_ptr<Registry>;
863
864 /// Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
865 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Locator`.
866 /// @headerfile IceGrid/IceGrid.h
867 class ICEGRID_API Locator : public virtual ::Ice::Locator
868 {
869 public:
870 /// The associated proxy type.
871 using ProxyType = LocatorPrx;
872
873 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
874 /// @param request The incoming request.
875 /// @param sendResponse The callback to send the response.
876 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
877
878 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
879
880 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
881
882 /// Gets a proxy to the registry object hosted by this IceGrid registry.
883 /// @param current The Current object of the incoming request.
884 /// @return A proxy to the registry object. This proxy is never null.
885 [[nodiscard]] virtual std::optional<RegistryPrx> getLocalRegistry(const Ice::Current& current) const = 0;
886
887 /// @private
888 void _iceD_getLocalRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
889
890 /// Gets a proxy to the query object hosted by this IceGrid registry.
891 /// @param current The Current object of the incoming request.
892 /// @return A proxy to the query object. This proxy is never null.
893 [[nodiscard]] virtual std::optional<QueryPrx> getLocalQuery(const Ice::Current& current) const = 0;
894
895 /// @private
896 void _iceD_getLocalQuery(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
897
898 /// Gets the type ID of the associated Slice interface.
899 /// @return The string `"::IceGrid::Locator"`.
900 static const char* ice_staticId() noexcept;
901 };
902
903 /// A shared pointer to a Locator.
904 using LocatorPtr = std::shared_ptr<Locator>;
905}
906
907namespace IceGrid
908{
909 /// Finds well-known Ice objects registered with the IceGrid registry.
910 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Query`.
911 /// @headerfile IceGrid/IceGrid.h
912 class ICEGRID_API AsyncQuery : public virtual Ice::Object
913 {
914 public:
915 /// The associated proxy type.
917
918 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
919 /// @param request The incoming request.
920 /// @param sendResponse The callback to send the response.
921 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
922
923 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
924
925 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
926
927 /// Finds a well-known object by identity.
928 /// @param id The identity.
929 /// @param response The response callback. It accepts:
930 /// - A proxy to the well-known object, or null if no such object is registered.
931 /// @param exception The exception callback.
932 /// @param current The Current object of the incoming request.
933 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;
934
935 /// @private
936 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
937
938 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
939 /// randomly selected.
940 /// @param type The object type.
941 /// @param response The response callback. It accepts:
942 /// - A proxy to a well-known object with the specified type, or null if no such object is registered.
943 /// @param exception The exception callback.
944 /// @param current The Current object of the incoming request.
945 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;
946
947 /// @private
948 void _iceD_findObjectByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
949
950 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
951 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
952 /// object is hosted on a node that has a load average of 1.0.
953 /// @param type The object type.
954 /// @param sample The sampling interval.
955 /// @param response The response callback. It accepts:
956 /// - A proxy to the well-known object, or null if no such object is registered.
957 /// @param exception The exception callback.
958 /// @param current The Current object of the incoming request.
959 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;
960
961 /// @private
962 void _iceD_findObjectByTypeOnLeastLoadedNode(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
963
964 /// Finds all the well-known objects with the given type.
965 /// @param type The object type.
966 /// @param response The response callback. It accepts:
967 /// - A list of proxies to the well-known objects with the specified type. Can be empty.
968 /// @param exception The exception callback.
969 /// @param current The Current object of the incoming request.
970 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;
971
972 /// @private
973 void _iceD_findAllObjectsByType(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
974
975 /// Finds all the replicas of a well-known object.
976 /// @param proxy A proxy that identifies the well-known object.
977 /// @param response The response callback. It accepts:
978 /// - A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
979 /// @param exception The exception callback.
980 /// @param current The Current object of the incoming request.
981 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;
982
983 /// @private
984 void _iceD_findAllReplicas(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
985
986 /// Gets the type ID of the associated Slice interface.
987 /// @return The string `"::IceGrid::Query"`.
988 static const char* ice_staticId() noexcept;
989 };
990
991 /// A shared pointer to an AsyncQuery.
992 using AsyncQueryPtr = std::shared_ptr<AsyncQuery>;
993
994 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
995 /// with the registry.
996 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Registry`.
997 /// @headerfile IceGrid/IceGrid.h
998 class ICEGRID_API AsyncRegistry : public virtual Ice::Object
999 {
1000 public:
1001 /// The associated proxy type.
1003
1004 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1005 /// @param request The incoming request.
1006 /// @param sendResponse The callback to send the response.
1007 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1008
1009 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1010
1011 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1012
1013 /// Creates a client session.
1014 /// @param userId The user ID.
1015 /// @param password The password for the given user.
1016 /// @param response The response callback. It accepts:
1017 /// - A proxy to the newly created session. This proxy is never null.
1018 /// @param exception The exception callback.
1019 /// @param current The Current object of the incoming request.
1020 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
1021 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;
1022
1023 /// @private
1024 void _iceD_createSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1025
1026 /// Creates an administrative session.
1027 /// @param userId The user ID.
1028 /// @param password The password for the given user.
1029 /// @param response The response callback. It accepts:
1030 /// - A proxy to the newly created session. This proxy is never null.
1031 /// @param exception The exception callback.
1032 /// @param current The Current object of the incoming request.
1033 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
1034 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;
1035
1036 /// @private
1037 void _iceD_createAdminSession(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1038
1039 /// Creates a client session from a secure connection.
1040 /// @param response The response callback. It accepts:
1041 /// - A proxy to the newly created session. This proxy is never null.
1042 /// @param exception The exception callback.
1043 /// @param current The Current object of the incoming request.
1044 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
1045 virtual void createSessionFromSecureConnectionAsync(std::function<void(const std::optional<SessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1046
1047 /// @private
1048 void _iceD_createSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1049
1050 /// Creates an administrative session from a secure connection.
1051 /// @param response The response callback. It accepts:
1052 /// - A proxy to the newly created session. This proxy is never null.
1053 /// @param exception The exception callback.
1054 /// @param current The Current object of the incoming request.
1055 /// @throws IceGrid::PermissionDeniedException Thrown when authentication or authorization fails.
1056 virtual void createAdminSessionFromSecureConnectionAsync(std::function<void(const std::optional<AdminSessionPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1057
1058 /// @private
1059 void _iceD_createAdminSessionFromSecureConnection(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1060
1061 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
1062 /// send heartbeats (using ACM) or call ::IceGrid::SessionPrx::keepAlive (resp. ::IceGrid::AdminSessionPrx::keepAlive) to keep
1063 /// a session alive in the IceGrid registry.
1064 /// @param response The response callback. It accepts:
1065 /// - The session timeout (in seconds).
1066 /// @param exception The exception callback.
1067 /// @param current The Current object of the incoming request.
1068 virtual void getSessionTimeoutAsync(std::function<void(std::int32_t returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1069
1070 /// @private
1071 void _iceD_getSessionTimeout(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1072
1073 /// Gets the type ID of the associated Slice interface.
1074 /// @return The string `"::IceGrid::Registry"`.
1075 static const char* ice_staticId() noexcept;
1076 };
1077
1078 /// A shared pointer to an AsyncRegistry.
1079 using AsyncRegistryPtr = std::shared_ptr<AsyncRegistry>;
1080
1081 /// Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
1082 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::Locator`.
1083 /// @headerfile IceGrid/IceGrid.h
1084 class ICEGRID_API AsyncLocator : public virtual ::Ice::AsyncLocator
1085 {
1086 public:
1087 /// The associated proxy type.
1089
1090 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1091 /// @param request The incoming request.
1092 /// @param sendResponse The callback to send the response.
1093 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1094
1095 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1096
1097 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1098
1099 /// Gets a proxy to the registry object hosted by this IceGrid registry.
1100 /// @param response The response callback. It accepts:
1101 /// - A proxy to the registry object. This proxy is never null.
1102 /// @param exception The exception callback.
1103 /// @param current The Current object of the incoming request.
1104 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;
1105
1106 /// @private
1107 void _iceD_getLocalRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1108
1109 /// Gets a proxy to the query object hosted by this IceGrid registry.
1110 /// @param response The response callback. It accepts:
1111 /// - A proxy to the query object. This proxy is never null.
1112 /// @param exception The exception callback.
1113 /// @param current The Current object of the incoming request.
1114 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;
1115
1116 /// @private
1117 void _iceD_getLocalQuery(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1118
1119 /// Gets the type ID of the associated Slice interface.
1120 /// @return The string `"::IceGrid::Locator"`.
1121 static const char* ice_staticId() noexcept;
1122 };
1123
1124 /// A shared pointer to an AsyncLocator.
1125 using AsyncLocatorPtr = std::shared_ptr<AsyncLocator>;
1126}
1127
1128namespace Ice
1129{
1130 /// @cond INTERNAL
1131 template<>
1132 struct StreamableTraits<::IceGrid::LoadSample>
1133 {
1134 static constexpr StreamHelperCategory helper = StreamHelperCategoryEnum;
1135 static constexpr int minValue = 0;
1136 static constexpr int maxValue = 2;
1137 static constexpr int minWireSize = 1;
1138 static constexpr bool fixedLength = false;
1139 };
1140 /// @endcond
1141}
1142
1143// NOLINTEND(modernize-concat-nested-namespaces)
1144
1145#include <Ice/PopDisableWarnings.h>
1146#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:1088
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:1085
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:916
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:913
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:1002
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:999
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:587
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:591
LocatorPrx & operator=(LocatorPrx &&rhs) noexcept
Move assignment operator.
Definition Registry.h:613
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:602
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:595
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:577
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:334
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:349
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:342
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:338
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:360
Represents the main entry point into the IceGrid registry service.
Definition Registry.h:329
Represents a request received by a connection.
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.h:371
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:265
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:48
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:1079
std::shared_ptr< Locator > LocatorPtr
A shared pointer to a Locator.
Definition Registry.h:904
std::shared_ptr< AsyncQuery > AsyncQueryPtr
A shared pointer to an AsyncQuery.
Definition Registry.h:992
std::shared_ptr< Query > QueryPtr
A shared pointer to a Query.
Definition Registry.h:785
std::shared_ptr< Registry > RegistryPtr
A shared pointer to a Registry.
Definition Registry.h:862
std::shared_ptr< AsyncLocator > AsyncLocatorPtr
A shared pointer to an AsyncLocator.
Definition Registry.h:1125
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