Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Router.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.3
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 < 3
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 `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 `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. The Ice runtime calls this function from an Ice thread pool
106 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
107 /// function. It accepts:
108 /// - `returnValue` The router's client proxy.
109 /// - `hasRoutingTable` Indicates whether or not the router supports a routing table. If `true`, the Ice
110 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
111 /// a routing table when `hasRoutingTable` is not set.
112 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
113 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
114 /// function.
115 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
116 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
117 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
118 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
119 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
120 /// asynchronous case.
121 /// @param context The request context.
122 /// @return A function that can be called to cancel the invocation locally.
123 /// @remarks Introduced in Ice 3.7.
124 // NOLINTNEXTLINE(modernize-use-nodiscard)
125 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;
126
127 /// @private
128 void _iceI_getClientProxy(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<std::optional<Ice::ObjectPrx>, std::optional<bool>>>>&, const Ice::Context&) const;
129
130 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
131 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
132 /// adapters.
133 /// @param context The request context.
134 /// @return The router's server proxy.
135 std::optional<Ice::ObjectPrx> getServerProxy(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
136
137 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
138 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
139 /// adapters.
140 /// @param context The request context.
141 /// @return A future that becomes available when the invocation completes. This future holds:
142 /// - The router's server proxy.
143 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> getServerProxyAsync(const Ice::Context& context = Ice::noExplicitContext) const;
144
145 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
146 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
147 /// adapters.
148 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
149 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
150 /// function. It accepts:
151 /// - The router's server proxy.
152 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
153 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
154 /// function.
155 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
156 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
157 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
158 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
159 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
160 /// asynchronous case.
161 /// @param context The request context.
162 /// @return A function that can be called to cancel the invocation locally.
163 // NOLINTNEXTLINE(modernize-use-nodiscard)
164 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;
165
166 /// @private
167 void _iceI_getServerProxy(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const Ice::Context&) const;
168
169 /// Adds new proxy information to the router's routing table.
170 /// @param proxies The proxies to add. Adding a null proxy is an error.
171 /// @param context The request context.
172 /// @return Proxies discarded by the router. These proxies are all non-null.
173 ObjectProxySeq addProxies(const ObjectProxySeq& proxies, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
174
175 /// Adds new proxy information to the router's routing table.
176 /// @param proxies The proxies to add. Adding a null proxy is an error.
177 /// @param context The request context.
178 /// @return A future that becomes available when the invocation completes. This future holds:
179 /// - Proxies discarded by the router. These proxies are all non-null.
180 [[nodiscard]] std::future<ObjectProxySeq> addProxiesAsync(const ObjectProxySeq& proxies, const Ice::Context& context = Ice::noExplicitContext) const;
181
182 /// Adds new proxy information to the router's routing table.
183 /// @param proxies The proxies to add. Adding a null proxy is an error.
184 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
185 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
186 /// function. It accepts:
187 /// - Proxies discarded by the router. These proxies are all non-null.
188 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
189 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
190 /// function.
191 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
192 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
193 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
194 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
195 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
196 /// asynchronous case.
197 /// @param context The request context.
198 /// @return A function that can be called to cancel the invocation locally.
199 // NOLINTNEXTLINE(modernize-use-nodiscard)
200 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;
201
202 /// @private
203 void _iceI_addProxies(const std::shared_ptr<IceInternal::OutgoingAsyncT<ObjectProxySeq>>&, const ObjectProxySeq&, const Ice::Context&) const;
204
205 /// Gets the type ID of the associated Slice interface.
206 /// @return The string `"::Ice::Router"`.
207 static const char* ice_staticId() noexcept;
208
209 /// @private
210 static RouterPrx _fromReference(IceInternal::ReferencePtr ref) { return RouterPrx{std::move(ref)}; }
211
212 protected:
213 /// @private
214 RouterPrx() = default;
215
216 /// @private
217 explicit RouterPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
218 {
219 }
220 };
221
222 /// Provides access to a RouterPrx object via a fixed identity.
223 /// A RouterFinder is always registered with identity `Ice/RouterFinder`. This allows clients to obtain the
224 /// associated Router proxy with just the endpoint information of the object. For example, you can use the
225 /// RouterFinder proxy `Ice/RouterFinder:tcp -h somehost -p 4061` to get the Router proxy
226 /// `MyGlacier2/Router:tcp -h somehost -p 4061`.
227 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::RouterFinder`.
228 /// @headerfile Ice/Ice.h
229 class ICE_API RouterFinderPrx : public Ice::Proxy<RouterFinderPrx, Ice::ObjectPrx>
230 {
231 public:
232 /// Constructs a proxy from a Communicator and a proxy string.
233 /// @param communicator The communicator of the new proxy.
234 /// @param proxyString The proxy string to parse.
235 RouterFinderPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
236
237 /// Copy constructor. Constructs with a copy of the contents of @p other.
238 /// @param other The proxy to copy from.
239 RouterFinderPrx(const RouterFinderPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
240
241 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
242 /// @param other The proxy to move from.
243 RouterFinderPrx(RouterFinderPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
244
245 ~RouterFinderPrx() override;
246
247 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
248 /// @param rhs The proxy to copy from.
249 /// @return A reference to this proxy.
251 {
252 if (this != &rhs)
253 {
255 }
256 return *this;
257 }
258
259 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
260 /// @param rhs The proxy to move from.
262 {
263 if (this != &rhs)
264 {
265 Ice::ObjectPrx::operator=(std::move(rhs));
266 }
267 return *this;
268 }
269
270 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
271 /// @param context The request context.
272 /// @return The router proxy. This proxy is never null.
273 std::optional<RouterPrx> getRouter(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
274
275 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
276 /// @param context The request context.
277 /// @return A future that becomes available when the invocation completes. This future holds:
278 /// - The router proxy. This proxy is never null.
279 [[nodiscard]] std::future<std::optional<RouterPrx>> getRouterAsync(const Ice::Context& context = Ice::noExplicitContext) const;
280
281 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
282 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
283 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
284 /// function. It accepts:
285 /// - The router proxy. This proxy is never null.
286 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
287 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
288 /// function.
289 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
290 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
291 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
292 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
293 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
294 /// asynchronous case.
295 /// @param context The request context.
296 /// @return A function that can be called to cancel the invocation locally.
297 // NOLINTNEXTLINE(modernize-use-nodiscard)
298 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;
299
300 /// @private
301 void _iceI_getRouter(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<RouterPrx>>>&, const Ice::Context&) const;
302
303 /// Gets the type ID of the associated Slice interface.
304 /// @return The string `"::Ice::RouterFinder"`.
305 static const char* ice_staticId() noexcept;
306
307 /// @private
308 static RouterFinderPrx _fromReference(IceInternal::ReferencePtr ref) { return RouterFinderPrx{std::move(ref)}; }
309
310 protected:
311 /// @private
312 RouterFinderPrx() = default;
313
314 /// @private
315 explicit RouterFinderPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
316 {
317 }
318 };
319}
320
321namespace Ice
322{
323 /// Represents an intermediary object that routes requests and replies between clients and Ice objects that are not
324 /// directly reachable from these clients.
325 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Router`.
326 /// @headerfile Ice/Ice.h
327 class ICE_API Router : public virtual Ice::Object
328 {
329 public:
330 /// The associated proxy type.
332
333 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
334 /// @param request The incoming request.
335 /// @param sendResponse The callback to send the response.
336 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
337
338 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
339
340 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
341
342 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
343 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
344 /// @param[out] hasRoutingTable Indicates whether or not the router supports a routing table. If `true`, the Ice
345 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
346 /// a routing table when `hasRoutingTable` is not set.
347 /// @param current The Current object of the incoming request.
348 /// @return The router's client proxy.
349 /// @remarks Introduced in Ice 3.7.
350 virtual std::optional<Ice::ObjectPrx> getClientProxy(std::optional<bool>& hasRoutingTable, const Ice::Current& current) const = 0;
351
352 /// @private
353 void _iceD_getClientProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
354
355 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
356 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
357 /// adapters.
358 /// @param current The Current object of the incoming request.
359 /// @return The router's server proxy.
360 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> getServerProxy(const Ice::Current& current) const = 0;
361
362 /// @private
363 void _iceD_getServerProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
364
365 /// Adds new proxy information to the router's routing table.
366 /// @param proxies The proxies to add. Adding a null proxy is an error.
367 /// @param current The Current object of the incoming request.
368 /// @return Proxies discarded by the router. These proxies are all non-null.
369 virtual ObjectProxySeq addProxies(ObjectProxySeq proxies, const Ice::Current& current) = 0;
370
371 /// @private
372 void _iceD_addProxies(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
373
374 /// Gets the type ID of the associated Slice interface.
375 /// @return The string `"::Ice::Router"`.
376 static const char* ice_staticId() noexcept;
377 };
378
379 /// A shared pointer to a Router.
380 using RouterPtr = std::shared_ptr<Router>;
381
382 /// Provides access to a RouterPrx object via a fixed identity.
383 /// A RouterFinder is always registered with identity `Ice/RouterFinder`. This allows clients to obtain the
384 /// associated Router proxy with just the endpoint information of the object. For example, you can use the
385 /// RouterFinder proxy `Ice/RouterFinder:tcp -h somehost -p 4061` to get the Router proxy
386 /// `MyGlacier2/Router:tcp -h somehost -p 4061`.
387 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RouterFinder`.
388 /// @headerfile Ice/Ice.h
389 class ICE_API RouterFinder : public virtual Ice::Object
390 {
391 public:
392 /// The associated proxy type.
394
395 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
396 /// @param request The incoming request.
397 /// @param sendResponse The callback to send the response.
398 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
399
400 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
401
402 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
403
404 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
405 /// @param current The Current object of the incoming request.
406 /// @return The router proxy. This proxy is never null.
407 virtual std::optional<RouterPrx> getRouter(const Ice::Current& current) = 0;
408
409 /// @private
410 void _iceD_getRouter(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
411
412 /// Gets the type ID of the associated Slice interface.
413 /// @return The string `"::Ice::RouterFinder"`.
414 static const char* ice_staticId() noexcept;
415 };
416
417 /// A shared pointer to a RouterFinder.
418 using RouterFinderPtr = std::shared_ptr<RouterFinder>;
419}
420
421namespace Ice
422{
423 /// Represents an intermediary object that routes requests and replies between clients and Ice objects that are not
424 /// directly reachable from these clients.
425 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Router`.
426 /// @headerfile Ice/Ice.h
427 class ICE_API AsyncRouter : public virtual Ice::Object
428 {
429 public:
430 /// The associated proxy type.
432
433 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
434 /// @param request The incoming request.
435 /// @param sendResponse The callback to send the response.
436 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
437
438 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
439
440 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
441
442 /// Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the
443 /// router. If a null proxy is returned, the client will forward requests to the router's endpoints.
444 /// @param response The response callback. It accepts:
445 /// - `returnValue` The router's client proxy.
446 /// - `hasRoutingTable` Indicates whether or not the router supports a routing table. If `true`, the Ice
447 /// runtime will call ::Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has
448 /// a routing table when `hasRoutingTable` is not set.
449 /// @param exception The exception callback.
450 /// @param current The Current object of the incoming request.
451 /// @remarks Introduced in Ice 3.7.
452 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;
453
454 /// @private
455 void _iceD_getClientProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
456
457 /// Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the
458 /// router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object
459 /// adapters.
460 /// @param response The response callback. It accepts:
461 /// - The router's server proxy.
462 /// @param exception The exception callback.
463 /// @param current The Current object of the incoming request.
464 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;
465
466 /// @private
467 void _iceD_getServerProxy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
468
469 /// Adds new proxy information to the router's routing table.
470 /// @param proxies The proxies to add. Adding a null proxy is an error.
471 /// @param response The response callback. It accepts:
472 /// - Proxies discarded by the router. These proxies are all non-null.
473 /// @param exception The exception callback.
474 /// @param current The Current object of the incoming request.
475 virtual void addProxiesAsync(ObjectProxySeq proxies, std::function<void(const ObjectProxySeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
476
477 /// @private
478 void _iceD_addProxies(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
479
480 /// Gets the type ID of the associated Slice interface.
481 /// @return The string `"::Ice::Router"`.
482 static const char* ice_staticId() noexcept;
483 };
484
485 /// A shared pointer to an AsyncRouter.
486 using AsyncRouterPtr = std::shared_ptr<AsyncRouter>;
487
488 /// Provides access to a RouterPrx object via a fixed identity.
489 /// A RouterFinder is always registered with identity `Ice/RouterFinder`. This allows clients to obtain the
490 /// associated Router proxy with just the endpoint information of the object. For example, you can use the
491 /// RouterFinder proxy `Ice/RouterFinder:tcp -h somehost -p 4061` to get the Router proxy
492 /// `MyGlacier2/Router:tcp -h somehost -p 4061`.
493 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RouterFinder`.
494 /// @headerfile Ice/Ice.h
495 class ICE_API AsyncRouterFinder : public virtual Ice::Object
496 {
497 public:
498 /// The associated proxy type.
500
501 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
502 /// @param request The incoming request.
503 /// @param sendResponse The callback to send the response.
504 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
505
506 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
507
508 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
509
510 /// Gets a proxy to the associated ::Ice::RouterPrx. The proxy might point to several replicas.
511 /// @param response The response callback. It accepts:
512 /// - The router proxy. This proxy is never null.
513 /// @param exception The exception callback.
514 /// @param current The Current object of the incoming request.
515 virtual void getRouterAsync(std::function<void(const std::optional<RouterPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
516
517 /// @private
518 void _iceD_getRouter(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
519
520 /// Gets the type ID of the associated Slice interface.
521 /// @return The string `"::Ice::RouterFinder"`.
522 static const char* ice_staticId() noexcept;
523 };
524
525 /// A shared pointer to an AsyncRouterFinder.
526 using AsyncRouterFinderPtr = std::shared_ptr<AsyncRouterFinder>;
527}
528
529// NOLINTEND(modernize-concat-nested-namespaces)
530
531#include <Ice/PopDisableWarnings.h>
532#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:499
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:496
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:431
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:428
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:265
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:48
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:235
RouterFinderPrx(const RouterFinderPrx &other) noexcept
Copy constructor.
Definition Router.h:239
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:250
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:243
RouterFinderPrx & operator=(RouterFinderPrx &&rhs) noexcept
Move assignment operator.
Definition Router.h:261
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:230
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:393
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:390
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:331
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:328
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:418
std::shared_ptr< Router > RouterPtr
A shared pointer to a Router.
Definition Router.h:380
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:526
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:486
The Ice RPC framework.
Definition SampleEvent.h:66
Provides information about an incoming request being dispatched.
Definition Current.h:18