Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Locator.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.3
4// <auto-generated>Generated from Slice file 'Locator.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_Locator_h_
8#define Ice_Locator_h_
9
11#include <Ice/Ice.h>
12#include "Identity.h"
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION / 100 != 308
16# error Ice version mismatch!
17# endif
18# if ICE_INT_VERSION % 100 >= 50
19# error Beta header file detected
20# endif
21# if ICE_INT_VERSION % 100 < 3
22# error Ice patch level mismatch!
23# endif
24#endif
25
26// NOLINTBEGIN(modernize-concat-nested-namespaces)
27
28namespace Ice
29{
31
32 class LocatorPrx;
33
34 class LocatorFinderPrx;
35}
36
37namespace Ice
38{
39 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
40 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
41 /// their object adapters.
42 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::Locator`.
43 /// @headerfile Ice/Ice.h
44 class ICE_API LocatorPrx : public Ice::Proxy<LocatorPrx, Ice::ObjectPrx>
45 {
46 public:
47 /// Constructs a proxy from a Communicator and a proxy string.
48 /// @param communicator The communicator of the new proxy.
49 /// @param proxyString The proxy string to parse.
50 LocatorPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
51
52 /// Copy constructor. Constructs with a copy of the contents of @p other.
53 /// @param other The proxy to copy from.
54 LocatorPrx(const LocatorPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
55
56 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
57 /// @param other The proxy to move from.
58 LocatorPrx(LocatorPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
59
60 ~LocatorPrx() override;
61
62 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
63 /// @param rhs The proxy to copy from.
64 /// @return A reference to this proxy.
65 LocatorPrx& operator=(const LocatorPrx& rhs) noexcept
66 {
67 if (this != &rhs)
68 {
70 }
71 return *this;
72 }
73
74 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
75 /// @param rhs The proxy to move from.
77 {
78 if (this != &rhs)
79 {
80 Ice::ObjectPrx::operator=(std::move(rhs));
81 }
82 return *this;
83 }
84
85 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
86 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
87 /// ::Ice::LocatorPrx::findAdapterById.
88 /// @param id The identity.
89 /// @param context The request context.
90 /// @return A dummy proxy, or null if an object with the requested identity was not found.
91 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
92 /// should treat this exception like a null return value.
93 std::optional<Ice::ObjectPrx> findObjectById(const Identity& id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
94
95 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
96 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
97 /// ::Ice::LocatorPrx::findAdapterById.
98 /// @param id The identity.
99 /// @param context The request context.
100 /// @return A future that becomes available when the invocation completes. This future holds:
101 /// - A dummy proxy, or null if an object with the requested identity was not found.
102 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByIdAsync(const Identity& id, const Ice::Context& context = Ice::noExplicitContext) const;
103
104 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
105 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
106 /// ::Ice::LocatorPrx::findAdapterById.
107 /// @param id The identity.
108 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
109 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
110 /// function. It accepts:
111 /// - A dummy proxy, or null if an object with the requested identity was not found.
112 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
113 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
114 /// function.
115 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
116 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
117 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
118 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
119 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
120 /// asynchronous case.
121 /// @param context The request context.
122 /// @return A function that can be called to cancel the invocation locally.
123 // NOLINTNEXTLINE(modernize-use-nodiscard)
124 std::function<void()> findObjectByIdAsync(const 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;
125
126 /// @private
127 void _iceI_findObjectById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const Identity&, const Ice::Context&) const;
128
129 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
130 /// @param id The adapter ID.
131 /// @param context The request context.
132 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
133 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
134 /// caller should treat this exception like a null return value.
135 std::optional<Ice::ObjectPrx> findAdapterById(std::string_view id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
136
137 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
138 /// @param id The adapter ID.
139 /// @param context The request context.
140 /// @return A future that becomes available when the invocation completes. This future holds:
141 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
142 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findAdapterByIdAsync(std::string_view id, const Ice::Context& context = Ice::noExplicitContext) const;
143
144 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
145 /// @param id The adapter ID.
146 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
147 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
148 /// function. It accepts:
149 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
150 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
151 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
152 /// function.
153 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
154 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
155 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
156 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
157 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
158 /// asynchronous case.
159 /// @param context The request context.
160 /// @return A function that can be called to cancel the invocation locally.
161 // NOLINTNEXTLINE(modernize-use-nodiscard)
162 std::function<void()> findAdapterByIdAsync(std::string_view 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;
163
164 /// @private
165 void _iceI_findAdapterById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, const Ice::Context&) const;
166
167 /// Gets a proxy to the locator registry.
168 /// @param context The request context.
169 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
170 std::optional<LocatorRegistryPrx> getRegistry(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
171
172 /// Gets a proxy to the locator registry.
173 /// @param context The request context.
174 /// @return A future that becomes available when the invocation completes. This future holds:
175 /// - A proxy to the locator registry, or null if this locator has no associated registry.
176 [[nodiscard]] std::future<std::optional<LocatorRegistryPrx>> getRegistryAsync(const Ice::Context& context = Ice::noExplicitContext) const;
177
178 /// Gets a proxy to the locator registry.
179 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
180 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
181 /// function. It accepts:
182 /// - A proxy to the locator registry, or null if this locator has no associated registry.
183 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
184 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
185 /// function.
186 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
187 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
188 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
189 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
190 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
191 /// asynchronous case.
192 /// @param context The request context.
193 /// @return A function that can be called to cancel the invocation locally.
194 // NOLINTNEXTLINE(modernize-use-nodiscard)
195 std::function<void()> getRegistryAsync(std::function<void(std::optional<::Ice::LocatorRegistryPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
196
197 /// @private
198 void _iceI_getRegistry(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<LocatorRegistryPrx>>>&, const Ice::Context&) const;
199
200 /// Gets the type ID of the associated Slice interface.
201 /// @return The string `"::Ice::Locator"`.
202 static const char* ice_staticId() noexcept;
203
204 /// @private
205 static LocatorPrx _fromReference(IceInternal::ReferencePtr ref) { return LocatorPrx{std::move(ref)}; }
206
207 protected:
208 /// @private
209 LocatorPrx() = default;
210
211 /// @private
212 explicit LocatorPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
213 {
214 }
215 };
216
217 /// Provides access to a LocatorPrx object via a fixed identity.
218 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
219 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
220 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
221 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
222 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::LocatorFinder`.
223 /// @headerfile Ice/Ice.h
224 class ICE_API LocatorFinderPrx : public Ice::Proxy<LocatorFinderPrx, Ice::ObjectPrx>
225 {
226 public:
227 /// Constructs a proxy from a Communicator and a proxy string.
228 /// @param communicator The communicator of the new proxy.
229 /// @param proxyString The proxy string to parse.
230 LocatorFinderPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
231
232 /// Copy constructor. Constructs with a copy of the contents of @p other.
233 /// @param other The proxy to copy from.
234 LocatorFinderPrx(const LocatorFinderPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
235
236 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
237 /// @param other The proxy to move from.
238 LocatorFinderPrx(LocatorFinderPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
239
240 ~LocatorFinderPrx() override;
241
242 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
243 /// @param rhs The proxy to copy from.
244 /// @return A reference to this proxy.
246 {
247 if (this != &rhs)
248 {
250 }
251 return *this;
252 }
253
254 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
255 /// @param rhs The proxy to move from.
257 {
258 if (this != &rhs)
259 {
260 Ice::ObjectPrx::operator=(std::move(rhs));
261 }
262 return *this;
263 }
264
265 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
266 /// @param context The request context.
267 /// @return The locator proxy. This proxy is never null.
268 std::optional<LocatorPrx> getLocator(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
269
270 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
271 /// @param context The request context.
272 /// @return A future that becomes available when the invocation completes. This future holds:
273 /// - The locator proxy. This proxy is never null.
274 [[nodiscard]] std::future<std::optional<LocatorPrx>> getLocatorAsync(const Ice::Context& context = Ice::noExplicitContext) const;
275
276 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
277 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
278 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
279 /// function. It accepts:
280 /// - The locator proxy. This proxy is never null.
281 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
282 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
283 /// function.
284 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
285 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
286 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
287 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
288 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
289 /// asynchronous case.
290 /// @param context The request context.
291 /// @return A function that can be called to cancel the invocation locally.
292 // NOLINTNEXTLINE(modernize-use-nodiscard)
293 std::function<void()> getLocatorAsync(std::function<void(std::optional<::Ice::LocatorPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
294
295 /// @private
296 void _iceI_getLocator(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<LocatorPrx>>>&, const Ice::Context&) const;
297
298 /// Gets the type ID of the associated Slice interface.
299 /// @return The string `"::Ice::LocatorFinder"`.
300 static const char* ice_staticId() noexcept;
301
302 /// @private
303 static LocatorFinderPrx _fromReference(IceInternal::ReferencePtr ref) { return LocatorFinderPrx{std::move(ref)}; }
304
305 protected:
306 /// @private
307 LocatorFinderPrx() = default;
308
309 /// @private
310 explicit LocatorFinderPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
311 {
312 }
313 };
314}
315
316namespace Ice
317{
318 /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object adapter.
319 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::AdapterNotFoundException`.
320 /// @headerfile Ice/Ice.h
322 {
323 public:
324 /// Gets the type ID of the associated Slice exception.
325 /// @return The string `"::Ice::AdapterNotFoundException"`.
326 static const char* ice_staticId() noexcept;
327
328 [[nodiscard]] const char* ice_id() const noexcept override;
329
330 void ice_throw() const override;
331
332 protected:
333 /// @private
334 void _writeImpl(Ice::OutputStream*) const override;
335
336 /// @private
337 void _readImpl(Ice::InputStream*) override;
338 };
339
340 /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object.
341 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::ObjectNotFoundException`.
342 /// @headerfile Ice/Ice.h
344 {
345 public:
346 /// Gets the type ID of the associated Slice exception.
347 /// @return The string `"::Ice::ObjectNotFoundException"`.
348 static const char* ice_staticId() noexcept;
349
350 [[nodiscard]] const char* ice_id() const noexcept override;
351
352 void ice_throw() const override;
353
354 protected:
355 /// @private
356 void _writeImpl(Ice::OutputStream*) const override;
357
358 /// @private
359 void _readImpl(Ice::InputStream*) override;
360 };
361}
362
363namespace Ice
364{
365 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
366 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
367 /// their object adapters.
368 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Locator`.
369 /// @headerfile Ice/Ice.h
370 class ICE_API Locator : public virtual Ice::Object
371 {
372 public:
373 /// The associated proxy type.
375
376 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
377 /// @param request The incoming request.
378 /// @param sendResponse The callback to send the response.
379 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
380
381 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
382
383 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
384
385 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
386 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
387 /// ::Ice::LocatorPrx::findAdapterById.
388 /// @param id The identity.
389 /// @param current The Current object of the incoming request.
390 /// @return A dummy proxy, or null if an object with the requested identity was not found.
391 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
392 /// should treat this exception like a null return value.
393 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectById(Identity id, const Ice::Current& current) const = 0;
394
395 /// @private
396 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
397
398 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
399 /// @param id The adapter ID.
400 /// @param current The Current object of the incoming request.
401 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
402 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
403 /// caller should treat this exception like a null return value.
404 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findAdapterById(std::string id, const Ice::Current& current) const = 0;
405
406 /// @private
407 void _iceD_findAdapterById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
408
409 /// Gets a proxy to the locator registry.
410 /// @param current The Current object of the incoming request.
411 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
412 [[nodiscard]] virtual std::optional<LocatorRegistryPrx> getRegistry(const Ice::Current& current) const = 0;
413
414 /// @private
415 void _iceD_getRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
416
417 /// Gets the type ID of the associated Slice interface.
418 /// @return The string `"::Ice::Locator"`.
419 static const char* ice_staticId() noexcept;
420 };
421
422 /// A shared pointer to a Locator.
423 using LocatorPtr = std::shared_ptr<Locator>;
424
425 /// Provides access to a LocatorPrx object via a fixed identity.
426 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
427 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
428 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
429 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
430 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LocatorFinder`.
431 /// @headerfile Ice/Ice.h
432 class ICE_API LocatorFinder : public virtual Ice::Object
433 {
434 public:
435 /// The associated proxy type.
437
438 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
439 /// @param request The incoming request.
440 /// @param sendResponse The callback to send the response.
441 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
442
443 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
444
445 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
446
447 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
448 /// @param current The Current object of the incoming request.
449 /// @return The locator proxy. This proxy is never null.
450 virtual std::optional<LocatorPrx> getLocator(const Ice::Current& current) = 0;
451
452 /// @private
453 void _iceD_getLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
454
455 /// Gets the type ID of the associated Slice interface.
456 /// @return The string `"::Ice::LocatorFinder"`.
457 static const char* ice_staticId() noexcept;
458 };
459
460 /// A shared pointer to a LocatorFinder.
461 using LocatorFinderPtr = std::shared_ptr<LocatorFinder>;
462}
463
464namespace Ice
465{
466 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
467 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
468 /// their object adapters.
469 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Locator`.
470 /// @headerfile Ice/Ice.h
471 class ICE_API AsyncLocator : public virtual Ice::Object
472 {
473 public:
474 /// The associated proxy type.
476
477 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
478 /// @param request The incoming request.
479 /// @param sendResponse The callback to send the response.
480 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
481
482 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
483
484 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
485
486 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
487 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
488 /// ::Ice::LocatorPrx::findAdapterById.
489 /// @param id The identity.
490 /// @param response The response callback. It accepts:
491 /// - A dummy proxy, or null if an object with the requested identity was not found.
492 /// @param exception The exception callback.
493 /// @param current The Current object of the incoming request.
494 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
495 /// should treat this exception like a null return value.
496 virtual void findObjectByIdAsync(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;
497
498 /// @private
499 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
500
501 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
502 /// @param id The adapter ID.
503 /// @param response The response callback. It accepts:
504 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
505 /// @param exception The exception callback.
506 /// @param current The Current object of the incoming request.
507 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
508 /// caller should treat this exception like a null return value.
509 virtual void findAdapterByIdAsync(std::string id, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
510
511 /// @private
512 void _iceD_findAdapterById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
513
514 /// Gets a proxy to the locator registry.
515 /// @param response The response callback. It accepts:
516 /// - A proxy to the locator registry, or null if this locator has no associated registry.
517 /// @param exception The exception callback.
518 /// @param current The Current object of the incoming request.
519 virtual void getRegistryAsync(std::function<void(const std::optional<LocatorRegistryPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
520
521 /// @private
522 void _iceD_getRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
523
524 /// Gets the type ID of the associated Slice interface.
525 /// @return The string `"::Ice::Locator"`.
526 static const char* ice_staticId() noexcept;
527 };
528
529 /// A shared pointer to an AsyncLocator.
530 using AsyncLocatorPtr = std::shared_ptr<AsyncLocator>;
531
532 /// Provides access to a LocatorPrx object via a fixed identity.
533 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
534 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
535 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
536 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
537 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LocatorFinder`.
538 /// @headerfile Ice/Ice.h
539 class ICE_API AsyncLocatorFinder : public virtual Ice::Object
540 {
541 public:
542 /// The associated proxy type.
544
545 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
546 /// @param request The incoming request.
547 /// @param sendResponse The callback to send the response.
548 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
549
550 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
551
552 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
553
554 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
555 /// @param response The response callback. It accepts:
556 /// - The locator proxy. This proxy is never null.
557 /// @param exception The exception callback.
558 /// @param current The Current object of the incoming request.
559 virtual void getLocatorAsync(std::function<void(const std::optional<LocatorPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
560
561 /// @private
562 void _iceD_getLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
563
564 /// Gets the type ID of the associated Slice interface.
565 /// @return The string `"::Ice::LocatorFinder"`.
566 static const char* ice_staticId() noexcept;
567 };
568
569 /// A shared pointer to an AsyncLocatorFinder.
571}
572
573// NOLINTEND(modernize-concat-nested-namespaces)
574
575#include <Ice/PopDisableWarnings.h>
576#endif
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_throw() const override
Throws this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
The exception that is thrown by a LocatorPrx implementation when it cannot find an object adapter.
Definition Locator.h:322
virtual void getLocatorAsync(std::function< void(const std::optional< LocatorPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets a proxy to the associated Ice::LocatorPrx.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this 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.
LocatorFinderPrx ProxyType
The associated proxy type.
Definition Locator.h:543
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
Provides access to a LocatorPrx object via a fixed identity.
Definition Locator.h:540
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual void getRegistryAsync(std::function< void(const std::optional< LocatorRegistryPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets a proxy to the locator 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 Locator.h:475
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void findAdapterByIdAsync(std::string 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 an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s)...
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 findObjectByIdAsync(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 an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this...
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.h:472
Represents a request received by a connection.
Represents a byte buffer used for unmarshaling data encoded using the Slice encoding.
Definition InputStream.h:50
LocatorFinderPrx & operator=(LocatorFinderPrx &&rhs) noexcept
Move assignment operator.
Definition Locator.h:256
LocatorFinderPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Locator.h:230
std::function< void()> getLocatorAsync(std::function< void(std::optional<::Ice::LocatorPrx >)> 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 associated Ice::LocatorPrx.
LocatorFinderPrx(const LocatorFinderPrx &other) noexcept
Copy constructor.
Definition Locator.h:234
std::optional< LocatorPrx > getLocator(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated Ice::LocatorPrx.
LocatorFinderPrx & operator=(const LocatorFinderPrx &rhs) noexcept
Copy assignment operator.
Definition Locator.h:245
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
LocatorFinderPrx(LocatorFinderPrx &&other) noexcept
Move constructor.
Definition Locator.h:238
std::future< std::optional< LocatorPrx > > getLocatorAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated Ice::LocatorPrx.
Provides access to a LocatorPrx object via a fixed identity.
Definition Locator.h:225
virtual std::optional< LocatorPrx > getLocator(const Ice::Current &current)=0
Gets a proxy to the associated Ice::LocatorPrx.
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.
void dispatch(IncomingRequest &request, std::function< void(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.
LocatorFinderPrx ProxyType
The associated proxy type.
Definition Locator.h:436
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Provides access to a LocatorPrx object via a fixed identity.
Definition Locator.h:433
std::optional< Ice::ObjectPrx > findObjectById(const Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this...
LocatorPrx & operator=(const LocatorPrx &rhs) noexcept
Copy assignment operator.
Definition Locator.h:65
std::optional< LocatorRegistryPrx > getRegistry(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the locator registry.
LocatorPrx(const LocatorPrx &other) noexcept
Copy constructor.
Definition Locator.h:54
std::future< std::optional< Ice::ObjectPrx > > findAdapterByIdAsync(std::string_view id, const Ice::Context &context=Ice::noExplicitContext) const
Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s)...
LocatorPrx & operator=(LocatorPrx &&rhs) noexcept
Move assignment operator.
Definition Locator.h:76
std::function< void()> getRegistryAsync(std::function< void(std::optional<::Ice::LocatorRegistryPrx >)> 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 locator registry.
std::function< void()> findAdapterByIdAsync(std::string_view 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 an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s)...
std::optional< Ice::ObjectPrx > findAdapterById(std::string_view id, const Ice::Context &context=Ice::noExplicitContext) const
Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s)...
std::function< void()> findObjectByIdAsync(const 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 an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this...
std::future< std::optional< Ice::ObjectPrx > > findObjectByIdAsync(const Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this...
LocatorPrx(LocatorPrx &&other) noexcept
Move constructor.
Definition Locator.h:58
LocatorPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Locator.h:50
std::future< std::optional< LocatorRegistryPrx > > getRegistryAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the locator registry.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.h:45
A server application registers the endpoints of its indirect object adapters with the LocatorRegistry...
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 std::optional< Ice::ObjectPrx > findObjectById(Identity id, const Ice::Current &current) const =0
Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this...
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
LocatorPrx ProxyType
The associated proxy type.
Definition Locator.h:374
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual std::optional< Ice::ObjectPrx > findAdapterById(std::string id, const Ice::Current &current) const =0
Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s)...
virtual std::optional< LocatorRegistryPrx > getRegistry(const Ice::Current &current) const =0
Gets a proxy to the locator registry.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.h:371
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_throw() const override
Throws this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
The exception that is thrown by a LocatorPrx implementation when it cannot find an object.
Definition Locator.h:344
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.
Represents a byte buffer used for marshaling data using the Slice encoding.
Provides typed proxy functions.
Definition Proxy.h:48
Abstract base class for all exceptions defined in Slice.
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::shared_ptr< LocatorFinder > LocatorFinderPtr
A shared pointer to a LocatorFinder.
Definition Locator.h:461
std::shared_ptr< AsyncLocator > AsyncLocatorPtr
A shared pointer to an AsyncLocator.
Definition Locator.h:530
std::shared_ptr< AsyncLocatorFinder > AsyncLocatorFinderPtr
A shared pointer to an AsyncLocatorFinder.
Definition Locator.h:570
std::shared_ptr< Locator > LocatorPtr
A shared pointer to a Locator.
Definition Locator.h:423
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