ADTF  3.18.4
cJSONClientConnector

Connector that sends RPC messages via HTTP. More...

Inheritance diagram for cJSONClientConnector:
[legend]

Public Member Functions

 cJSONClientConnector (const std::string &strUrl)
 Constructor. More...
 
 ~cJSONClientConnector ()
 DTOR.
 
 cJSONClientConnector (const cJSONClientConnector &)=delete
 Disable copy construction.
 
cJSONClientConnectoroperator= (const cJSONClientConnector &)=delete
 Disable copy assignment.
 
 cJSONClientConnector (cJSONClientConnector &&other)
 Move constructor. More...
 
cJSONClientConnectoroperator= (cJSONClientConnector &&other)
 Move assignment. More...
 
void SendRPCMessage (const std::string &message, std::string &result) override
 Send an RPC message to the connected url. More...
 

Private Attributes

cImplementation * m_pImplementation
 

Detailed Description

Connector that sends RPC messages via HTTP.

Definition at line 37 of file json_http_rpc.h.

Constructor & Destructor Documentation

◆ cJSONClientConnector() [1/2]

cJSONClientConnector ( const std::string &  strUrl)

Constructor.

Parameters
[in]strUrlThe HTTP url, i.e. http://localhost:8000/system

◆ cJSONClientConnector() [2/2]

Move constructor.

Parameters
[in,out]otherMove from object *this is created from. Left in empty state.

Member Function Documentation

◆ operator=()

cJSONClientConnector& operator= ( cJSONClientConnector &&  other)

Move assignment.

Parameters
[in,out]otherMove from object *this is created from. Left in empty state.
Returns
*this

◆ SendRPCMessage()

void SendRPCMessage ( const std::string &  message,
std::string &  result 
)
overridevirtual

Send an RPC message to the connected url.

Parameters
[in]messageMessage to send
[out]resultThe result of the response
Exceptions
jsonrpc::JsonRpcExceptionin case of a connection error

Implements IClientConnector.