MIRA
Public Member Functions | List of all members
JSONRPCBackend::ClientResponse Class Reference

JSON client-side response. More...

#include <rpc/JSONRPCBackend.h>

Public Member Functions

 ClientResponse (json::Value *value)
 
void getHeader (std::string &oCallId) const
 Read the response header (i.e. More...
 
template<typename R >
void getReturn (boost::promise< R > &promise) const
 Obtain return value from response and set it using promise.set_value() or set exception using promise.set_exception(). More...
 

Detailed Description

JSON client-side response.

The response must have been created by the RPCServer and it must be contained in the value that is passed in the constructor.

See also
Backends

Constructor & Destructor Documentation

◆ ClientResponse()

ClientResponse ( json::Value value)
inline

Member Function Documentation

◆ getHeader()

void getHeader ( std::string &  oCallId) const
inline

Read the response header (i.e.

the call id of the RPC call) from the response. This method is called first by the RPCClient when a response is handled

◆ getReturn()

void getReturn ( boost::promise< R > &  promise) const
inline

Obtain return value from response and set it using promise.set_value() or set exception using promise.set_exception().

See documentation of boost::promise and boost::future for details about futures and promises. This method is called after getHeader().


The documentation for this class was generated from the following file: