ADTF  3.18.3
jsonrpc_object_server< ServerStub, Connector >

Template to implement an RPC object. More...

Inheritance diagram for jsonrpc_object_server< ServerStub, Connector >:
[legend]

Public Member Functions

 jsonrpc_object_server ()
 CTOR.
 
virtual a_util::result::Result HandleCall (const char *strRequest, size_t nRequestSize, IResponse &oResponse)
 Handles an RPC call. More...
 

Additional Inherited Members

- Protected Member Functions inherited from cServerConnector
bool StartListening ()
 Currently not implemented, returns always true. More...
 
bool StopListening ()
 Currently not implemented, returns always true. More...
 
bool SendResponse (const std::string &response, void *addInfo)
 Sets the response to addInfo which must be of type IResponse. More...
 
bool OnRequest (const std::string &request, IResponse *response)
 Called on request. More...
 
- Protected Member Functions inherited from AbstractServerConnector
void ProcessRequest (const std::string &request, std::string &response)
 
void SetHandler (IClientConnectionHandler *handler)
 
IClientConnectionHandlerGetHandler ()
 
- Static Protected Member Functions inherited from cJSONConversions
static Json::Value result_to_json (a_util::result::Result nResult)
 Get the Json::Value representation of an object of type a_util::result::Result. More...
 
static std::string to_string (uint64_t nValue)
 Convert an unsigned integer to a string. More...
 
static std::string to_string (int64_t nValue)
 Convert a signed integer to a string. More...
 
static a_util::result::Result json_to_result (const Json::Value &oValue)
 Get the a_util::result::Result representation of an object of type Json::Value. More...
 
static uint64_t stoull (const std::string &strValue)
 Convert a string to an unsigned integer. More...
 
static int64_t stoll (const std::string &strValue)
 Convert a string to a signed integer. More...
 

Detailed Description

template<typename ServerStub, typename Connector = cServerConnector>
class rpc::jsonrpc_object_server< ServerStub, Connector >

Template to implement an RPC object.

Template Parameters
ServerStubThe server stub to inherit from
ConnectorThe connector to inherit from

Definition at line 159 of file json_rpc.h.

Member Function Documentation

◆ HandleCall()

a_util::result::Result HandleCall ( const char *  strRequest,
size_t  nRequestSize,
IResponse oResponse 
)
inlinevirtual

Handles an RPC call.

Parameters
[in]strRequestThe request message
[in]nRequestSizeSize of the request message
[out]oResponseGets the response message set

Implements IRPCObject.

Definition at line 56 of file json_rpc_impl.h.