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