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