Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Locator.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.2
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 < 2
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. 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.
283 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::AdapterNotFoundException`.
284 /// @headerfile Ice/Ice.h
286 {
287 public:
288 /// Gets the type ID of the associated Slice exception.
289 /// @return The string `"::Ice::AdapterNotFoundException"`.
290 static const char* ice_staticId() noexcept;
291
292 [[nodiscard]] const char* ice_id() const noexcept override;
293
294 void ice_throw() const override;
295
296 protected:
297 /// @private
298 void _writeImpl(Ice::OutputStream*) const override;
299
300 /// @private
301 void _readImpl(Ice::InputStream*) override;
302 };
303
304 /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object.
305 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::ObjectNotFoundException`.
306 /// @headerfile Ice/Ice.h
308 {
309 public:
310 /// Gets the type ID of the associated Slice exception.
311 /// @return The string `"::Ice::ObjectNotFoundException"`.
312 static const char* ice_staticId() noexcept;
313
314 [[nodiscard]] const char* ice_id() const noexcept override;
315
316 void ice_throw() const override;
317
318 protected:
319 /// @private
320 void _writeImpl(Ice::OutputStream*) const override;
321
322 /// @private
323 void _readImpl(Ice::InputStream*) override;
324 };
325}
326
327namespace Ice
328{
329 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
330 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
331 /// their object adapters.
332 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Locator`.
333 /// @headerfile Ice/Ice.h
334 class ICE_API Locator : public virtual Ice::Object
335 {
336 public:
337 /// The associated proxy type.
339
340 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
341 /// @param request The incoming request.
342 /// @param sendResponse The callback to send the response.
343 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
344
345 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
346
347 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
348
349 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
350 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
351 /// ::Ice::LocatorPrx::findAdapterById.
352 /// @param id The identity.
353 /// @param current The Current object of the incoming request.
354 /// @return A dummy proxy, or null if an object with the requested identity was not found.
355 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
356 /// should treat this exception like a null return value.
357 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findObjectById(Identity id, const Ice::Current& current) const = 0;
358
359 /// @private
360 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
361
362 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
363 /// @param id The adapter ID.
364 /// @param current The Current object of the incoming request.
365 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
366 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
367 /// caller should treat this exception like a null return value.
368 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> findAdapterById(std::string id, const Ice::Current& current) const = 0;
369
370 /// @private
371 void _iceD_findAdapterById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
372
373 /// Gets a proxy to the locator registry.
374 /// @param current The Current object of the incoming request.
375 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
376 [[nodiscard]] virtual std::optional<LocatorRegistryPrx> getRegistry(const Ice::Current& current) const = 0;
377
378 /// @private
379 void _iceD_getRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
380
381 /// Gets the type ID of the associated Slice interface.
382 /// @return The string `"::Ice::Locator"`.
383 static const char* ice_staticId() noexcept;
384 };
385
386 /// A shared pointer to a Locator.
387 using LocatorPtr = std::shared_ptr<Locator>;
388
389 /// Provides access to a LocatorPrx object via a fixed identity.
390 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
391 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
392 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
393 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
394 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LocatorFinder`.
395 /// @headerfile Ice/Ice.h
396 class ICE_API LocatorFinder : public virtual Ice::Object
397 {
398 public:
399 /// The associated proxy type.
401
402 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
403 /// @param request The incoming request.
404 /// @param sendResponse The callback to send the response.
405 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
406
407 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
408
409 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
410
411 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
412 /// @param current The Current object of the incoming request.
413 /// @return The locator proxy. This proxy is never null.
414 virtual std::optional<LocatorPrx> getLocator(const Ice::Current& current) = 0;
415
416 /// @private
417 void _iceD_getLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
418
419 /// Gets the type ID of the associated Slice interface.
420 /// @return The string `"::Ice::LocatorFinder"`.
421 static const char* ice_staticId() noexcept;
422 };
423
424 /// A shared pointer to a LocatorFinder.
425 using LocatorFinderPtr = std::shared_ptr<LocatorFinder>;
426}
427
428namespace Ice
429{
430 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
431 /// server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register
432 /// their object adapters.
433 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Locator`.
434 /// @headerfile Ice/Ice.h
435 class ICE_API AsyncLocator : public virtual Ice::Object
436 {
437 public:
438 /// The associated proxy type.
440
441 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
442 /// @param request The incoming request.
443 /// @param sendResponse The callback to send the response.
444 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
445
446 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
447
448 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
449
450 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
451 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
452 /// ::Ice::LocatorPrx::findAdapterById.
453 /// @param id The identity.
454 /// @param response The response callback. It accepts:
455 /// - A dummy proxy, or null if an object with the requested identity was not found.
456 /// @param exception The exception callback.
457 /// @param current The Current object of the incoming request.
458 /// @throws Ice::ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
459 /// should treat this exception like a null return value.
460 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;
461
462 /// @private
463 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
464
465 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
466 /// @param id The adapter ID.
467 /// @param response The response callback. It accepts:
468 /// - A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
469 /// @param exception The exception callback.
470 /// @param current The Current object of the incoming request.
471 /// @throws Ice::AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
472 /// caller should treat this exception like a null return value.
473 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;
474
475 /// @private
476 void _iceD_findAdapterById(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
477
478 /// Gets a proxy to the locator registry.
479 /// @param response The response callback. It accepts:
480 /// - A proxy to the locator registry, or null if this locator has no associated registry.
481 /// @param exception The exception callback.
482 /// @param current The Current object of the incoming request.
483 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;
484
485 /// @private
486 void _iceD_getRegistry(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
487
488 /// Gets the type ID of the associated Slice interface.
489 /// @return The string `"::Ice::Locator"`.
490 static const char* ice_staticId() noexcept;
491 };
492
493 /// A shared pointer to an AsyncLocator.
494 using AsyncLocatorPtr = std::shared_ptr<AsyncLocator>;
495
496 /// Provides access to a LocatorPrx object via a fixed identity.
497 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
498 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
499 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
500 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
501 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LocatorFinder`.
502 /// @headerfile Ice/Ice.h
503 class ICE_API AsyncLocatorFinder : public virtual Ice::Object
504 {
505 public:
506 /// The associated proxy type.
508
509 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
510 /// @param request The incoming request.
511 /// @param sendResponse The callback to send the response.
512 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
513
514 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
515
516 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
517
518 /// Gets a proxy to the associated ::Ice::LocatorPrx. The proxy might point to several replicas.
519 /// @param response The response callback. It accepts:
520 /// - The locator proxy. This proxy is never null.
521 /// @param exception The exception callback.
522 /// @param current The Current object of the incoming request.
523 virtual void getLocatorAsync(std::function<void(const std::optional<LocatorPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
524
525 /// @private
526 void _iceD_getLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
527
528 /// Gets the type ID of the associated Slice interface.
529 /// @return The string `"::Ice::LocatorFinder"`.
530 static const char* ice_staticId() noexcept;
531 };
532
533 /// A shared pointer to an AsyncLocatorFinder.
535}
536
537// NOLINTEND(modernize-concat-nested-namespaces)
538
539#include <Ice/PopDisableWarnings.h>
540#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:286
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:507
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:504
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:439
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:436
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:400
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:397
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:338
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:335
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:308
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:425
std::shared_ptr< AsyncLocator > AsyncLocatorPtr
A shared pointer to an AsyncLocator.
Definition Locator.h:494
std::shared_ptr< AsyncLocatorFinder > AsyncLocatorFinderPtr
A shared pointer to an AsyncLocatorFinder.
Definition Locator.h:534
std::shared_ptr< Locator > LocatorPtr
A shared pointer to a Locator.
Definition Locator.h:387
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