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