Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Router.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
4// <auto-generated>Generated from Slice file 'Router.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_Router_h_
8#define Ice_Router_h_
9
11#include <Ice/Ice.h>
12#include "BuiltinSequences.h"
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION / 100 != 308
16# error Ice version mismatch!
17# endif
18# if ICE_INT_VERSION % 100 >= 50
19# error Beta header file detected
20# endif
21# if ICE_INT_VERSION % 100 < 0
22# error Ice patch level mismatch!
23# endif
24#endif
25
26// NOLINTBEGIN(modernize-concat-nested-namespaces)
27
28namespace Ice
29{
30 class RouterPrx;
31
32 class RouterFinderPrx;
33}
34
35namespace Ice
36{
37 /// Represents an intermediary object that routes requests and replies between clients and Ice objects that are not
38 /// directly reachable from these clients.
39 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::Router`.
40 /// @headerfile Ice/Ice.h
41 class ICE_API RouterPrx : public Ice::Proxy<RouterPrx, Ice::ObjectPrx>
42 {
43 public:
44 /// Constructs a proxy from a Communicator and a proxy string.
45 /// @param communicator The communicator of the new proxy.
46 /// @param proxyString The proxy string to parse.
47 RouterPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
48
49 /// Copy constructor. Constructs with a copy of the contents of @p other.
50 /// @param other The proxy to copy from.
51 RouterPrx(const RouterPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
52
53 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
54 /// @param other The proxy to move from.
55 RouterPrx(RouterPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
56
57 ~RouterPrx() override;
58
59 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
60 /// @param rhs The proxy to copy from.
61 /// @return A reference to this proxy.
62 RouterPrx& operator=(const RouterPrx& rhs) noexcept
63 {
64 if (this != &rhs)
65 {
67 }
68 return *this;
69 }
70
71 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
72 /// @param rhs The proxy to move from.
73 RouterPrx& operator=(RouterPrx&& rhs) noexcept
74 {
75 if (this != &rhs)
76 {
77 Ice::ObjectPrx::operator=(std::move(rhs));
78 }
79 return *this;
80 }
81
82 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
83 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
84 /// @param[out] hasRoutingTable Indicates whether or not the router supports a routing table. If `true`, the Ice
85 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
86 /// a routing table when @p hasRoutingTable is not set.
87 /// @param context The request context.
88 /// @return The router's client proxy.
89 /// @remarks Introduced in Ice 3.7.
90 std::optional<Ice::ObjectPrx> getClientProxy(std::optional<bool>& hasRoutingTable, const Ice::Context& context = Ice::noExplicitContext) const;
91
92 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
93 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
94 /// @param context The request context.
95 /// @return A future that becomes available when the invocation completes. This future holds:
96 /// - `returnValue` The router's client proxy.
97 /// - `hasRoutingTable` Indicates whether or not the router supports a routing table. If `true`, the Ice
98 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
99 /// a routing table when @p hasRoutingTable is not set.
100 /// @remarks Introduced in Ice 3.7.
101 [[nodiscard]] std::future<std::tuple<std::optional<Ice::ObjectPrx>, std::optional<bool>>> getClientProxyAsync(const Ice::Context& context = Ice::noExplicitContext) const;
102
103 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
104 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
105 /// @param response The response callback. It accepts:
106 /// - `returnValue` The router's client proxy.
107 /// - `hasRoutingTable` Indicates whether or not the router supports a routing table. If `true`, the Ice
108 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
109 /// a routing table when @p hasRoutingTable is not set.
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 /// @remarks Introduced in Ice 3.7.
115 // NOLINTNEXTLINE(modernize-use-nodiscard)
116 std::function<void()> getClientProxyAsync(std::function<void(std::optional<Ice::ObjectPrx>, std::optional<bool>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
117
118 /// @private
119 void _iceI_getClientProxy(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<std::optional<Ice::ObjectPrx>, std::optional<bool>>>>&, const Ice::Context&) const;
120
121 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
122 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
123 /// adapters.
124 /// @param context The request context.
125 /// @return The router's server proxy.
126 std::optional<Ice::ObjectPrx> getServerProxy(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
127
128 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
129 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
130 /// adapters.
131 /// @param context The request context.
132 /// @return A future that becomes available when the invocation completes. This future holds:
133 /// - The router's server proxy.
134 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> getServerProxyAsync(const Ice::Context& context = Ice::noExplicitContext) const;
135
136 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
137 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
138 /// adapters.
139 /// @param response The response callback. It accepts:
140 /// - The router's server proxy.
141 /// @param exception The exception callback.
142 /// @param sent The sent callback.
143 /// @param context The request context.
144 /// @return A function that can be called to cancel the invocation locally.
145 // NOLINTNEXTLINE(modernize-use-nodiscard)
146 std::function<void()> getServerProxyAsync(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;
147
148 /// @private
149 void _iceI_getServerProxy(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const Ice::Context&) const;
150
151 /// Adds new proxy information to the router's routing table.
152 /// @param proxies The proxies to add. Adding a null proxy is an error.
153 /// @param context The request context.
154 /// @return Proxies discarded by the router. These proxies are all non-null.
155 ObjectProxySeq addProxies(const ObjectProxySeq& proxies, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
156
157 /// Adds new proxy information to the router's routing table.
158 /// @param proxies The proxies to add. Adding a null proxy is an error.
159 /// @param context The request context.
160 /// @return A future that becomes available when the invocation completes. This future holds:
161 /// - Proxies discarded by the router. These proxies are all non-null.
162 [[nodiscard]] std::future<ObjectProxySeq> addProxiesAsync(const ObjectProxySeq& proxies, const Ice::Context& context = Ice::noExplicitContext) const;
163
164 /// Adds new proxy information to the router's routing table.
165 /// @param proxies The proxies to add. Adding a null proxy is an error.
166 /// @param response The response callback. It accepts:
167 /// - Proxies discarded by the router. These proxies are all non-null.
168 /// @param exception The exception callback.
169 /// @param sent The sent callback.
170 /// @param context The request context.
171 /// @return A function that can be called to cancel the invocation locally.
172 // NOLINTNEXTLINE(modernize-use-nodiscard)
173 std::function<void()> addProxiesAsync(const ObjectProxySeq& proxies, std::function<void(::Ice::ObjectProxySeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
174
175 /// @private
176 void _iceI_addProxies(const std::shared_ptr<IceInternal::OutgoingAsyncT<ObjectProxySeq>>&, const ObjectProxySeq&, const Ice::Context&) const;
177
178 /// Gets the type ID of the associated Slice interface.
179 /// @return The string `"::Ice::Router"`.
180 static const char* ice_staticId() noexcept;
181
182 /// @private
183 static RouterPrx _fromReference(IceInternal::ReferencePtr ref) { return RouterPrx{std::move(ref)}; }
184
185 protected:
186 /// @private
187 RouterPrx() = default;
188
189 /// @private
190 explicit RouterPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
191 {
192 }
193 };
194
195 /// Provides access to a RouterPrx object via a fixed identity.
196 /// A RouterFinder is always registered with identity `Ice/RouterFinder`. This allows clients to obtain the
197 /// associated Router proxy with just the endpoint information of the object. For example, you can use the
198 /// RouterFinder proxy `Ice/RouterFinder:tcp -h somehost -p 4061` to get the Router proxy
199 /// `MyGlacier2/Router:tcp -h somehost -p 4061`.
200 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::RouterFinder`.
201 /// @headerfile Ice/Ice.h
202 class ICE_API RouterFinderPrx : public Ice::Proxy<RouterFinderPrx, Ice::ObjectPrx>
203 {
204 public:
205 /// Constructs a proxy from a Communicator and a proxy string.
206 /// @param communicator The communicator of the new proxy.
207 /// @param proxyString The proxy string to parse.
208 RouterFinderPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
209
210 /// Copy constructor. Constructs with a copy of the contents of @p other.
211 /// @param other The proxy to copy from.
212 RouterFinderPrx(const RouterFinderPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
213
214 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
215 /// @param other The proxy to move from.
216 RouterFinderPrx(RouterFinderPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
217
218 ~RouterFinderPrx() override;
219
220 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
221 /// @param rhs The proxy to copy from.
222 /// @return A reference to this proxy.
224 {
225 if (this != &rhs)
226 {
228 }
229 return *this;
230 }
231
232 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
233 /// @param rhs The proxy to move from.
235 {
236 if (this != &rhs)
237 {
238 Ice::ObjectPrx::operator=(std::move(rhs));
239 }
240 return *this;
241 }
242
243 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
244 /// @param context The request context.
245 /// @return The router proxy. This proxy is never null.
246 std::optional<RouterPrx> getRouter(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
247
248 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
249 /// @param context The request context.
250 /// @return A future that becomes available when the invocation completes. This future holds:
251 /// - The router proxy. This proxy is never null.
252 [[nodiscard]] std::future<std::optional<RouterPrx>> getRouterAsync(const Ice::Context& context = Ice::noExplicitContext) const;
253
254 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
255 /// @param response The response callback. It accepts:
256 /// - The router proxy. This proxy is never null.
257 /// @param exception The exception callback.
258 /// @param sent The sent callback.
259 /// @param context The request context.
260 /// @return A function that can be called to cancel the invocation locally.
261 // NOLINTNEXTLINE(modernize-use-nodiscard)
262 std::function<void()> getRouterAsync(std::function<void(std::optional<::Ice::RouterPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
263
264 /// @private
265 void _iceI_getRouter(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<RouterPrx>>>&, const Ice::Context&) const;
266
267 /// Gets the type ID of the associated Slice interface.
268 /// @return The string `"::Ice::RouterFinder"`.
269 static const char* ice_staticId() noexcept;
270
271 /// @private
272 static RouterFinderPrx _fromReference(IceInternal::ReferencePtr ref) { return RouterFinderPrx{std::move(ref)}; }
273
274 protected:
275 /// @private
276 RouterFinderPrx() = default;
277
278 /// @private
279 explicit RouterFinderPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
280 {
281 }
282 };
283}
284
285namespace Ice
286{
287 /// Represents an intermediary object that routes requests and replies between clients and Ice objects that are not
288 /// directly reachable from these clients.
289 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Router`.
290 /// @headerfile Ice/Ice.h
291 class ICE_API Router : public virtual Ice::Object
292 {
293 public:
294 /// The associated proxy type.
296
297 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
298 /// @param request The incoming request.
299 /// @param sendResponse The callback to send the response.
300 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
301
302 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
303
304 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
305
306 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
307 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
308 /// @param[out] hasRoutingTable Indicates whether or not the router supports a routing table. If `true`, the Ice
309 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
310 /// a routing table when @p hasRoutingTable is not set.
311 /// @param current The Current object of the incoming request.
312 /// @return The router's client proxy.
313 /// @remarks Introduced in Ice 3.7.
314 virtual std::optional<Ice::ObjectPrx> getClientProxy(std::optional<bool>& hasRoutingTable, const Ice::Current& current) const = 0;
315
316 /// @private
317 void _iceD_getClientProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
318
319 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
320 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
321 /// adapters.
322 /// @param current The Current object of the incoming request.
323 /// @return The router's server proxy.
324 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> getServerProxy(const Ice::Current& current) const = 0;
325
326 /// @private
327 void _iceD_getServerProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
328
329 /// Adds new proxy information to the router's routing table.
330 /// @param proxies The proxies to add. Adding a null proxy is an error.
331 /// @param current The Current object of the incoming request.
332 /// @return Proxies discarded by the router. These proxies are all non-null.
333 virtual ObjectProxySeq addProxies(ObjectProxySeq proxies, const Ice::Current& current) = 0;
334
335 /// @private
336 void _iceD_addProxies(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
337
338 /// Gets the type ID of the associated Slice interface.
339 /// @return The string `"::Ice::Router"`.
340 static const char* ice_staticId() noexcept;
341 };
342
343 /// A shared pointer to a Router.
344 using RouterPtr = std::shared_ptr<Router>;
345
346 /// Provides access to a RouterPrx object via a fixed identity.
347 /// A RouterFinder is always registered with identity `Ice/RouterFinder`. This allows clients to obtain the
348 /// associated Router proxy with just the endpoint information of the object. For example, you can use the
349 /// RouterFinder proxy `Ice/RouterFinder:tcp -h somehost -p 4061` to get the Router proxy
350 /// `MyGlacier2/Router:tcp -h somehost -p 4061`.
351 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RouterFinder`.
352 /// @headerfile Ice/Ice.h
353 class ICE_API RouterFinder : public virtual Ice::Object
354 {
355 public:
356 /// The associated proxy type.
358
359 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
360 /// @param request The incoming request.
361 /// @param sendResponse The callback to send the response.
362 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
363
364 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
365
366 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
367
368 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
369 /// @param current The Current object of the incoming request.
370 /// @return The router proxy. This proxy is never null.
371 virtual std::optional<RouterPrx> getRouter(const Ice::Current& current) = 0;
372
373 /// @private
374 void _iceD_getRouter(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
375
376 /// Gets the type ID of the associated Slice interface.
377 /// @return The string `"::Ice::RouterFinder"`.
378 static const char* ice_staticId() noexcept;
379 };
380
381 /// A shared pointer to a RouterFinder.
382 using RouterFinderPtr = std::shared_ptr<RouterFinder>;
383}
384
385namespace Ice
386{
387 /// Represents an intermediary object that routes requests and replies between clients and Ice objects that are not
388 /// directly reachable from these clients.
389 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Router`.
390 /// @headerfile Ice/Ice.h
391 class ICE_API AsyncRouter : public virtual Ice::Object
392 {
393 public:
394 /// The associated proxy type.
396
397 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
398 /// @param request The incoming request.
399 /// @param sendResponse The callback to send the response.
400 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
401
402 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
403
404 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
405
406 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
407 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
408 /// @param response The response callback. It accepts:
409 /// - `returnValue` The router's client proxy.
410 /// - `hasRoutingTable` Indicates whether or not the router supports a routing table. If `true`, the Ice
411 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
412 /// a routing table when @p hasRoutingTable is not set.
413 /// @param exception The exception callback.
414 /// @param current The Current object of the incoming request.
415 /// @remarks Introduced in Ice 3.7.
416 virtual void getClientProxyAsync(std::function<void(const std::optional<Ice::ObjectPrx>& returnValue, std::optional<bool> hasRoutingTable)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
417
418 /// @private
419 void _iceD_getClientProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
420
421 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
422 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
423 /// adapters.
424 /// @param response The response callback. It accepts:
425 /// - The router's server proxy.
426 /// @param exception The exception callback.
427 /// @param current The Current object of the incoming request.
428 virtual void getServerProxyAsync(std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
429
430 /// @private
431 void _iceD_getServerProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
432
433 /// Adds new proxy information to the router's routing table.
434 /// @param proxies The proxies to add. Adding a null proxy is an error.
435 /// @param response The response callback. It accepts:
436 /// - Proxies discarded by the router. These proxies are all non-null.
437 /// @param exception The exception callback.
438 /// @param current The Current object of the incoming request.
439 virtual void addProxiesAsync(ObjectProxySeq proxies, std::function<void(const ObjectProxySeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
440
441 /// @private
442 void _iceD_addProxies(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
443
444 /// Gets the type ID of the associated Slice interface.
445 /// @return The string `"::Ice::Router"`.
446 static const char* ice_staticId() noexcept;
447 };
448
449 /// A shared pointer to an AsyncRouter.
450 using AsyncRouterPtr = std::shared_ptr<AsyncRouter>;
451
452 /// Provides access to a RouterPrx object via a fixed identity.
453 /// A RouterFinder is always registered with identity `Ice/RouterFinder`. This allows clients to obtain the
454 /// associated Router proxy with just the endpoint information of the object. For example, you can use the
455 /// RouterFinder proxy `Ice/RouterFinder:tcp -h somehost -p 4061` to get the Router proxy
456 /// `MyGlacier2/Router:tcp -h somehost -p 4061`.
457 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RouterFinder`.
458 /// @headerfile Ice/Ice.h
459 class ICE_API AsyncRouterFinder : public virtual Ice::Object
460 {
461 public:
462 /// The associated proxy type.
464
465 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
466 /// @param request The incoming request.
467 /// @param sendResponse The callback to send the response.
468 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
469
470 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
471
472 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
473
474 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
475 /// @param response The response callback. It accepts:
476 /// - The router proxy. This proxy is never null.
477 /// @param exception The exception callback.
478 /// @param current The Current object of the incoming request.
479 virtual void getRouterAsync(std::function<void(const std::optional<RouterPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
480
481 /// @private
482 void _iceD_getRouter(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
483
484 /// Gets the type ID of the associated Slice interface.
485 /// @return The string `"::Ice::RouterFinder"`.
486 static const char* ice_staticId() noexcept;
487 };
488
489 /// A shared pointer to an AsyncRouterFinder.
490 using AsyncRouterFinderPtr = std::shared_ptr<AsyncRouterFinder>;
491}
492
493// NOLINTEND(modernize-concat-nested-namespaces)
494
495#include <Ice/PopDisableWarnings.h>
496#endif
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.
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.
RouterFinderPrx ProxyType
The associated proxy type.
Definition Router.h:463
virtual void getRouterAsync(std::function< void(const std::optional< RouterPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets a proxy to the associated Ice::RouterPrx.
Provides access to a RouterPrx object via a fixed identity.
Definition Router.h:460
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void addProxiesAsync(ObjectProxySeq proxies, std::function< void(const ObjectProxySeq &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Adds new proxy information to the router's routing table.
virtual void getClientProxyAsync(std::function< void(const std::optional< Ice::ObjectPrx > &returnValue, std::optional< bool > hasRoutingTable)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets the router's client proxy, i.e.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
RouterPrx ProxyType
The associated proxy type.
Definition Router.h:395
virtual void getServerProxyAsync(std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets the router's server proxy, i.e.
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.
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Definition Router.h:392
Represents a request received by a connection.
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.
Provides typed proxy functions.
Definition Proxy.h:45
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
RouterFinderPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Router.h:208
RouterFinderPrx(const RouterFinderPrx &other) noexcept
Copy constructor.
Definition Router.h:212
std::future< std::optional< RouterPrx > > getRouterAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated Ice::RouterPrx.
RouterFinderPrx & operator=(const RouterFinderPrx &rhs) noexcept
Copy assignment operator.
Definition Router.h:223
std::function< void()> getRouterAsync(std::function< void(std::optional<::Ice::RouterPrx >)> 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::RouterPrx.
RouterFinderPrx(RouterFinderPrx &&other) noexcept
Move constructor.
Definition Router.h:216
RouterFinderPrx & operator=(RouterFinderPrx &&rhs) noexcept
Move assignment operator.
Definition Router.h:234
std::optional< RouterPrx > getRouter(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated Ice::RouterPrx.
Provides access to a RouterPrx object via a fixed identity.
Definition Router.h:203
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.
RouterFinderPrx ProxyType
The associated proxy type.
Definition Router.h:357
virtual std::optional< RouterPrx > getRouter(const Ice::Current &current)=0
Gets a proxy to the associated Ice::RouterPrx.
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,...
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 RouterPrx object via a fixed identity.
Definition Router.h:354
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< ObjectProxySeq > addProxiesAsync(const ObjectProxySeq &proxies, const Ice::Context &context=Ice::noExplicitContext) const
Adds new proxy information to the router's routing table.
std::optional< Ice::ObjectPrx > getServerProxy(const Ice::Context &context=Ice::noExplicitContext) const
Gets the router's server proxy, i.e.
std::future< std::tuple< std::optional< Ice::ObjectPrx >, std::optional< bool > > > getClientProxyAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the router's client proxy, i.e.
std::function< void()> getClientProxyAsync(std::function< void(std::optional< Ice::ObjectPrx >, std::optional< bool >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the router's client proxy, i.e.
RouterPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Router.h:47
RouterPrx & operator=(RouterPrx &&rhs) noexcept
Move assignment operator.
Definition Router.h:73
std::optional< Ice::ObjectPrx > getClientProxy(std::optional< bool > &hasRoutingTable, const Ice::Context &context=Ice::noExplicitContext) const
Gets the router's client proxy, i.e.
std::future< std::optional< Ice::ObjectPrx > > getServerProxyAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the router's server proxy, i.e.
std::function< void()> addProxiesAsync(const ObjectProxySeq &proxies, std::function< void(::Ice::ObjectProxySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Adds new proxy information to the router's routing table.
RouterPrx(RouterPrx &&other) noexcept
Move constructor.
Definition Router.h:55
ObjectProxySeq addProxies(const ObjectProxySeq &proxies, const Ice::Context &context=Ice::noExplicitContext) const
Adds new proxy information to the router's routing table.
std::function< void()> getServerProxyAsync(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
Gets the router's server proxy, i.e.
RouterPrx & operator=(const RouterPrx &rhs) noexcept
Copy assignment operator.
Definition Router.h:62
RouterPrx(const RouterPrx &other) noexcept
Copy constructor.
Definition Router.h:51
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Definition Router.h:42
RouterPrx ProxyType
The associated proxy type.
Definition Router.h:295
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 > getClientProxy(std::optional< bool > &hasRoutingTable, const Ice::Current &current) const =0
Gets the router's client proxy, i.e.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
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 ObjectProxySeq addProxies(ObjectProxySeq proxies, const Ice::Current &current)=0
Adds new proxy information to the router's routing table.
virtual std::optional< Ice::ObjectPrx > getServerProxy(const Ice::Current &current) const =0
Gets the router's server proxy, i.e.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Definition Router.h:292
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< RouterFinder > RouterFinderPtr
A shared pointer to a RouterFinder.
Definition Router.h:382
std::shared_ptr< Router > RouterPtr
A shared pointer to a Router.
Definition Router.h:344
std::vector< std::optional< Ice::ObjectPrx > > ObjectProxySeq
A sequence of object proxies.
std::shared_ptr< AsyncRouterFinder > AsyncRouterFinderPtr
A shared pointer to an AsyncRouterFinder.
Definition Router.h:490
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:34
std::shared_ptr< AsyncRouter > AsyncRouterPtr
A shared pointer to an AsyncRouter.
Definition Router.h:450
The Ice RPC framework.
Definition SampleEvent.h:66
Provides information about an incoming request being dispatched.
Definition Current.h:18