Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Locator.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
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 < 0
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 the 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 the 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 the 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. It accepts:
109 /// - A dummy proxy, or null if an object with the requested identity was not found.
110 /// @param exception The exception callback.
111 /// @param sent The sent callback.
112 /// @param context The request context.
113 /// @return A function that can be called to cancel the invocation locally.
114 // NOLINTNEXTLINE(modernize-use-nodiscard)
115 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;
116
117 /// @private
118 void _iceI_findObjectById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const Identity&, const Ice::Context&) const;
119
120 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
121 /// @param id The adapter ID.
122 /// @param context The request context.
123 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
124 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
125 /// caller should treat this exception like a null return value.
126 std::optional<Ice::ObjectPrx> findAdapterById(std::string_view id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
127
128 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
129 /// @param id The adapter ID.
130 /// @param context The request context.
131 /// @return A future that becomes available when the invocation completes. This future holds:
132 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
133 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findAdapterByIdAsync(std::string_view id, const Ice::Context& context = Ice::noExplicitContext) const;
134
135 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
136 /// @param id The adapter ID.
137 /// @param response The response callback. It accepts:
138 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
139 /// @param exception The exception callback.
140 /// @param sent The sent callback.
141 /// @param context The request context.
142 /// @return A function that can be called to cancel the invocation locally.
143 // NOLINTNEXTLINE(modernize-use-nodiscard)
144 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;
145
146 /// @private
147 void _iceI_findAdapterById(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view, const Ice::Context&) const;
148
149 /// Gets a proxy to the locator registry.
150 /// @param context The request context.
151 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
152 std::optional<LocatorRegistryPrx> getRegistry(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
153
154 /// Gets a proxy to the locator registry.
155 /// @param context The request context.
156 /// @return A future that becomes available when the invocation completes. This future holds:
157 /// - A proxy to the locator registry, or null if this locator has no associated registry.
158 [[nodiscard]] std::future<std::optional<LocatorRegistryPrx>> getRegistryAsync(const Ice::Context& context = Ice::noExplicitContext) const;
159
160 /// Gets a proxy to the locator registry.
161 /// @param response The response callback. It accepts:
162 /// - A proxy to the locator registry, or null if this locator has no associated registry.
163 /// @param exception The exception callback.
164 /// @param sent The sent callback.
165 /// @param context The request context.
166 /// @return A function that can be called to cancel the invocation locally.
167 // NOLINTNEXTLINE(modernize-use-nodiscard)
168 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;
169
170 /// @private
171 void _iceI_getRegistry(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<LocatorRegistryPrx>>>&, const Ice::Context&) const;
172
173 /// Gets the type ID of the associated Slice interface.
174 /// @return The string `"::Ice::Locator"`.
175 static const char* ice_staticId() noexcept;
176
177 /// @private
178 static LocatorPrx _fromReference(IceInternal::ReferencePtr ref) { return LocatorPrx{std::move(ref)}; }
179
180 protected:
181 /// @private
182 LocatorPrx() = default;
183
184 /// @private
185 explicit LocatorPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
186 {
187 }
188 };
189
190 /// Provides access to a LocatorPrx object via a fixed identity.
191 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
192 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
193 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
194 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
195 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::LocatorFinder`.
196 /// @headerfile Ice/Ice.h
197 class ICE_API LocatorFinderPrx : public Ice::Proxy<LocatorFinderPrx, Ice::ObjectPrx>
198 {
199 public:
200 /// Constructs a proxy from a Communicator and a proxy string.
201 /// @param communicator The communicator of the new proxy.
202 /// @param proxyString The proxy string to parse.
203 LocatorFinderPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
204
205 /// Copy constructor. Constructs with a copy of the contents of @p other.
206 /// @param other The proxy to copy from.
207 LocatorFinderPrx(const LocatorFinderPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
208
209 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
210 /// @param other The proxy to move from.
211 LocatorFinderPrx(LocatorFinderPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
212
213 ~LocatorFinderPrx() override;
214
215 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
216 /// @param rhs The proxy to copy from.
217 /// @return A reference to this proxy.
219 {
220 if (this != &rhs)
221 {
223 }
224 return *this;
225 }
226
227 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
228 /// @param rhs The proxy to move from.
230 {
231 if (this != &rhs)
232 {
233 Ice::ObjectPrx::operator=(std::move(rhs));
234 }
235 return *this;
236 }
237
238 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
239 /// @param context The request context.
240 /// @return The locator proxy. This proxy is never null.
241 std::optional<LocatorPrx> getLocator(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
242
243 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
244 /// @param context The request context.
245 /// @return A future that becomes available when the invocation completes. This future holds:
246 /// - The locator proxy. This proxy is never null.
247 [[nodiscard]] std::future<std::optional<LocatorPrx>> getLocatorAsync(const Ice::Context& context = Ice::noExplicitContext) const;
248
249 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
250 /// @param response The response callback. It accepts:
251 /// - The locator proxy. This proxy is never null.
252 /// @param exception The exception callback.
253 /// @param sent The sent callback.
254 /// @param context The request context.
255 /// @return A function that can be called to cancel the invocation locally.
256 // NOLINTNEXTLINE(modernize-use-nodiscard)
257 std::function<void()> 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;
258
259 /// @private
260 void _iceI_getLocator(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<LocatorPrx>>>&, const Ice::Context&) const;
261
262 /// Gets the type ID of the associated Slice interface.
263 /// @return The string `"::Ice::LocatorFinder"`.
264 static const char* ice_staticId() noexcept;
265
266 /// @private
267 static LocatorFinderPrx _fromReference(IceInternal::ReferencePtr ref) { return LocatorFinderPrx{std::move(ref)}; }
268
269 protected:
270 /// @private
271 LocatorFinderPrx() = default;
272
273 /// @private
274 explicit LocatorFinderPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
275 {
276 }
277 };
278}
279
280namespace Ice
281{
282 /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object adapter with the
283 /// provided adapter ID.
284 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::AdapterNotFoundException`.
285 /// @headerfile Ice/Ice.h
287 {
288 public:
289 /// Gets the type ID of the associated Slice exception.
290 /// @return The string `"::Ice::AdapterNotFoundException"`.
291 static const char* ice_staticId() noexcept;
292
293 [[nodiscard]] const char* ice_id() const noexcept override;
294
295 void ice_throw() const override;
296
297 protected:
298 /// @private
299 void _writeImpl(Ice::OutputStream*) const override;
300
301 /// @private
302 void _readImpl(Ice::InputStream*) override;
303 };
304
305 /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object with the provided
306 /// identity.
307 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::ObjectNotFoundException`.
308 /// @headerfile Ice/Ice.h
310 {
311 public:
312 /// Gets the type ID of the associated Slice exception.
313 /// @return The string `"::Ice::ObjectNotFoundException"`.
314 static const char* ice_staticId() noexcept;
315
316 [[nodiscard]] const char* ice_id() const noexcept override;
317
318 void ice_throw() const override;
319
320 protected:
321 /// @private
322 void _writeImpl(Ice::OutputStream*) const override;
323
324 /// @private
325 void _readImpl(Ice::InputStream*) override;
326 };
327}
328
329namespace Ice
330{
331 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
332 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
333 /// their object adapters.
334 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Locator`.
335 /// @headerfile Ice/Ice.h
336 class ICE_API Locator : public virtual Ice::Object
337 {
338 public:
339 /// The associated proxy type.
341
342 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
343 /// @param request The incoming request.
344 /// @param sendResponse The callback to send the response.
345 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
346
347 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
348
349 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
350
351 /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
352 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
353 /// ::Ice::LocatorPrx::findAdapterById.
354 /// @param id The identity.
355 /// @param current The Current object of the incoming request.
356 /// @return A dummy proxy, or null if an object with the requested identity was not found.
357 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
358 /// should treat this exception like a null return value.
359 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectById(Identity id, const Ice::Current& current) const = 0;
360
361 /// @private
362 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
363
364 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
365 /// @param id The adapter ID.
366 /// @param current The Current object of the incoming request.
367 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
368 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
369 /// caller should treat this exception like a null return value.
370 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findAdapterById(std::string id, const Ice::Current& current) const = 0;
371
372 /// @private
373 void _iceD_findAdapterById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
374
375 /// Gets a proxy to the locator registry.
376 /// @param current The Current object of the incoming request.
377 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
378 [[nodiscard]] virtual std::optional<LocatorRegistryPrx> getRegistry(const Ice::Current& current) const = 0;
379
380 /// @private
381 void _iceD_getRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
382
383 /// Gets the type ID of the associated Slice interface.
384 /// @return The string `"::Ice::Locator"`.
385 static const char* ice_staticId() noexcept;
386 };
387
388 /// A shared pointer to a Locator.
389 using LocatorPtr = std::shared_ptr<Locator>;
390
391 /// Provides access to a LocatorPrx object via a fixed identity.
392 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
393 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
394 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
395 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
396 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LocatorFinder`.
397 /// @headerfile Ice/Ice.h
398 class ICE_API LocatorFinder : public virtual Ice::Object
399 {
400 public:
401 /// The associated proxy type.
403
404 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
405 /// @param request The incoming request.
406 /// @param sendResponse The callback to send the response.
407 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
408
409 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
410
411 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
412
413 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
414 /// @param current The Current object of the incoming request.
415 /// @return The locator proxy. This proxy is never null.
416 virtual std::optional<LocatorPrx> getLocator(const Ice::Current& current) = 0;
417
418 /// @private
419 void _iceD_getLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
420
421 /// Gets the type ID of the associated Slice interface.
422 /// @return The string `"::Ice::LocatorFinder"`.
423 static const char* ice_staticId() noexcept;
424 };
425
426 /// A shared pointer to a LocatorFinder.
427 using LocatorFinderPtr = std::shared_ptr<LocatorFinder>;
428}
429
430namespace Ice
431{
432 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
433 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
434 /// their object adapters.
435 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Locator`.
436 /// @headerfile Ice/Ice.h
437 class ICE_API AsyncLocator : public virtual Ice::Object
438 {
439 public:
440 /// The associated proxy type.
442
443 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
444 /// @param request The incoming request.
445 /// @param sendResponse The callback to send the response.
446 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
447
448 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
449
450 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
451
452 /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
453 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
454 /// ::Ice::LocatorPrx::findAdapterById.
455 /// @param id The identity.
456 /// @param response The response callback. It accepts:
457 /// - A dummy proxy, or null if an object with the requested identity was not found.
458 /// @param exception The exception callback.
459 /// @param current The Current object of the incoming request.
460 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
461 /// should treat this exception like a null return value.
462 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;
463
464 /// @private
465 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
466
467 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
468 /// @param id The adapter ID.
469 /// @param response The response callback. It accepts:
470 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
471 /// @param exception The exception callback.
472 /// @param current The Current object of the incoming request.
473 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
474 /// caller should treat this exception like a null return value.
475 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;
476
477 /// @private
478 void _iceD_findAdapterById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
479
480 /// Gets a proxy to the locator registry.
481 /// @param response The response callback. It accepts:
482 /// - A proxy to the locator registry, or null if this locator has no associated registry.
483 /// @param exception The exception callback.
484 /// @param current The Current object of the incoming request.
485 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;
486
487 /// @private
488 void _iceD_getRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
489
490 /// Gets the type ID of the associated Slice interface.
491 /// @return The string `"::Ice::Locator"`.
492 static const char* ice_staticId() noexcept;
493 };
494
495 /// A shared pointer to an AsyncLocator.
496 using AsyncLocatorPtr = std::shared_ptr<AsyncLocator>;
497
498 /// Provides access to a LocatorPrx object via a fixed identity.
499 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
500 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
501 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
502 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
503 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LocatorFinder`.
504 /// @headerfile Ice/Ice.h
505 class ICE_API AsyncLocatorFinder : public virtual Ice::Object
506 {
507 public:
508 /// The associated proxy type.
510
511 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
512 /// @param request The incoming request.
513 /// @param sendResponse The callback to send the response.
514 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
515
516 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
517
518 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
519
520 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
521 /// @param response The response callback. It accepts:
522 /// - The locator proxy. This proxy is never null.
523 /// @param exception The exception callback.
524 /// @param current The Current object of the incoming request.
525 virtual void getLocatorAsync(std::function<void(const std::optional<LocatorPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
526
527 /// @private
528 void _iceD_getLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
529
530 /// Gets the type ID of the associated Slice interface.
531 /// @return The string `"::Ice::LocatorFinder"`.
532 static const char* ice_staticId() noexcept;
533 };
534
535 /// A shared pointer to an AsyncLocatorFinder.
537}
538
539// NOLINTEND(modernize-concat-nested-namespaces)
540
541#include <Ice/PopDisableWarnings.h>
542#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 wit...
Definition Locator.h:287
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:509
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:506
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:441
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 the endpoint(s) that can be used to reach ...
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.h:438
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:229
LocatorFinderPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Locator.h:203
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:207
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:218
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
LocatorFinderPrx(LocatorFinderPrx &&other) noexcept
Move constructor.
Definition Locator.h:211
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:198
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:402
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:399
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 the endpoint(s) that can be used to reach ...
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 the endpoint(s) that can be used to reach ...
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 the endpoint(s) that can be used to reach ...
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 the endpoint(s) that can be used to reach ...
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:340
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:337
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 with the pr...
Definition Locator.h:310
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
Object() noexcept=default
Default constructor.
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Represents a byte buffer used for marshaling data using the Slice encoding.
Provides typed proxy functions.
Definition Proxy.h:45
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:427
std::shared_ptr< AsyncLocator > AsyncLocatorPtr
A shared pointer to an AsyncLocator.
Definition Locator.h:496
std::shared_ptr< AsyncLocatorFinder > AsyncLocatorFinderPtr
A shared pointer to an AsyncLocatorFinder.
Definition Locator.h:536
std::shared_ptr< Locator > LocatorPtr
A shared pointer to a Locator.
Definition Locator.h:389
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