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

◆ dispatch()

virtual void Ice::Object::dispatch ( IncomingRequest & request,
std::function< void(OutgoingResponse)> sendResponse )
virtual

Dispatches an incoming request and returns the corresponding outgoing response.

Parameters
requestThe incoming request.
sendResponseA callback that the implementation calls to return the response. sendResponse does not throw any exception and any sendResponse wrapper must not throw any exception. sendResponse can be called by the thread that called dispatch (the "dispatch thread") or by another thread. The implementation must call sendResponse exactly once or throw an exception.
Remarks
Calling sendResponse can be thought as returning the outgoing response. Just like when you return a value from a remote operation, you can only return it once and you don't know if the client receives this value. In practice, the Ice-provided sendResponse attempts to send the response to the client synchronously, but may send it asynchronously. It can also silently fail to send the response back to the client. This function is the main building block for the Ice dispatch pipeline. The implementation provided by the base class (Object) dispatches incoming requests to the four Object operations (ice_isA, ice_ping, ice_ids and ice_id), and throws OperationNotExistException for all other operations. This base implementation is trivial and should be overridden and fully replaced by all derived classes.

Reimplemented in Glacier2::PermissionsVerifier, Glacier2::Session, Glacier2::SessionManager, Glacier2::SSLPermissionsVerifier, Glacier2::SSLSessionManager, Ice::Locator, Ice::LocatorFinder, Ice::LocatorRegistry, Ice::PropertiesAdmin, Ice::RemoteLogger, Ice::Router, Ice::RouterFinder, IceBox::ServiceObserver, IceDiscovery::Lookup, IceDiscovery::LookupReply, IceGrid::AdapterObserver, IceGrid::ApplicationObserver, IceGrid::NodeObserver, IceGrid::ObjectObserver, IceGrid::RegistryObserver, IceGrid::UserAccountMapper, IceLocatorDiscovery::Lookup, and IceLocatorDiscovery::LookupReply.