MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
JSONRPCBackend::ClientRequest Class Reference

JSON client-side request. More...

#include <rpc/JSONRPCBackend.h>

Public Member Functions

 ClientRequest (json::Value *value)
 
std::string generateCallID ()
 Generates a unique call ID for a client request of this backend. More...
 
void setHeader (const std::string &callId, const std::string &service, const RPCSignature &signature)
 Write the request header consisting of the call ID, the service name and the signature of the requested method. More...
 
template<typename P >
void setParameter (const P &param)
 Write the value of the next parameter to the request. More...
 

Detailed Description

JSON client-side request.

The request is written into the value that is passed in the constructor.

See Also
Backends

Constructor & Destructor Documentation

ClientRequest ( json::Value value)
inline

Member Function Documentation

std::string generateCallID ( )
inline

Generates a unique call ID for a client request of this backend.

As call id an integer is used that is increasing with each call.

void setHeader ( const std::string &  callId,
const std::string &  service,
const RPCSignature signature 
)
inline

Write the request header consisting of the call ID, the service name and the signature of the requested method.

This method is called first by the RPCClient when a new request is generated.

void setParameter ( const P &  param)
inline

Write the value of the next parameter to the request.

This method is called multiple times after the setHeader() method for each parameter that is passed to the RPCClient::call() method.


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