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