MIRA
|
JSON server-side response. More...
#include <rpc/JSONRPCBackend.h>
Public Member Functions | |
ServerResponse (json::Value *value) | |
void | setHeader (const std::string &callId) |
Write the response header consisting of the ID of the call. More... | |
void | returnException (RPCError reason, const std::string &message) |
Write exception as result an RPC call. More... | |
void | returnException (RPCError reason, const std::string &message, const CallStack &callstack) |
Write exception as result an RPC call. More... | |
void | returnException (RPCError reason, SerializableException &ex) |
Write exception as result an RPC call. More... | |
template<typename R > | |
void | returnResult (const R &res) |
Write result of an RPC call. More... | |
void | returnVoid () |
Write successful end of an RPC call. More... | |
JSON server-side response.
The response is written to the value that is passed in the constructor.
|
inline |
|
inline |
Write the response header consisting of the ID of the call.
This method is called first by the RPCServer to create a response for a finished RPC call. It will be followed by a call of either returnException(), returnResult() or returnVoid().
|
inline |
Write exception as result an RPC call.
This method is called after setHeader() in case of an error or exception while processing the call. The reason is passed as parameter.
|
inline |
Write exception as result an RPC call.
This method is called after setHeader() in case of an error or exception while processing the call. The reason is passed as parameter.
|
inline |
Write exception as result an RPC call.
This method is called after setHeader() in case of an error or exception while processing the call. The reason is passed as parameter.
|
inline |
Write result of an RPC call.
This method is called after setHeader() in case of a successful RPC call that returns a value.
|
inline |
Write successful end of an RPC call.
This method is called after setHeader() in case of a successful RPC call that does NOT return a value.