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