Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches

◆ getClientProxyAsync() [2/2]

std::function< void()> Ice::RouterPrx::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.

the proxy to use for forwarding requests from the client to the router. If a null proxy is returned, the client will forward requests to the router's endpoints.

Parameters
responseThe response callback. The Ice runtime calls this function from an Ice thread pool thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this function. It accepts:
  • returnValue The router's client proxy.
  • hasRoutingTable Indicates whether or not the router supports a routing table. If true, the Ice runtime will call Ice::RouterPrx::addProxies to populate the routing table. The Ice runtime assumes the router has a routing table when hasRoutingTable is not set.
exceptionThe exception callback. The Ice runtime calls this function from an Ice thread pool thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this function.
sentThe sent callback. The Ice runtime calls this function when the request is accepted by the transport. When the request is accepted synchronously, the Ice runtime calls this function from the current thread and passes true as argument. When the request is accepted asynchronously, the Ice runtime calls this function from an Ice thread pool thread and passes false as argument. If you set Ice::InitializationData::executor, the executor determines the thread that executes this function in the asynchronous case.
contextThe request context.
Returns
A function that can be called to cancel the invocation locally.
Remarks
Introduced in Ice 3.7.