QJsonChannelCore
QJsonChannelService Class Reference

Service wrapper over QOblect is responsible for QObjects methods ivocation according to JSON-RPC requests messages. More...

#include <QJsonChannelService.h>

Collaboration diagram for QJsonChannelService:
Collaboration graph

Public Member Functions

 QJsonChannelService (const QByteArray &name, const QByteArray &version, const QByteArray &description, QSharedPointer< QObject > obj, bool serviceObjIsThreadSafe)
 Construct a new QJsonChannelService object. More...
 
 ~QJsonChannelService ()
 
QSharedPointer< QObject > serviceObj ()
 Returns service object. More...
 
const QByteArray & serviceName () const
 Returns service name. More...
 
const QJsonObject & serviceInfo () const
 Returns JSON Document contains JSON Schema Service Descriptor (https://jsonrpc.org/historical/json-schema-service-descriptor.html) More...
 
QJsonChannelMessage dispatch (const QJsonChannelMessage &request) const
 Process a JSON-RPC message. In general it means the invocation of a requested function. More...
 

Detailed Description

Service wrapper over QOblect is responsible for QObjects methods ivocation according to JSON-RPC requests messages.

Definition at line 15 of file QJsonChannelService.h.

Constructor & Destructor Documentation

◆ QJsonChannelService()

QJsonChannelService::QJsonChannelService ( const QByteArray &  name,
const QByteArray &  version,
const QByteArray &  description,
QSharedPointer< QObject >  obj,
bool  serviceObjIsThreadSafe 
)

Construct a new QJsonChannelService object.

Parameters
nameService name
versionService version
descriptionService description
serviceObjIsThreadSafeIs the service object thread safe
objService object

◆ ~QJsonChannelService()

QJsonChannelService::~QJsonChannelService ( )

Member Function Documentation

◆ serviceObj()

QSharedPointer<QObject> QJsonChannelService::serviceObj ( )

Returns service object.

Returns
QSharedPointer<QObject>

◆ serviceName()

const QByteArray& QJsonChannelService::serviceName ( ) const

Returns service name.

Returns
const QByteArray&

◆ serviceInfo()

const QJsonObject& QJsonChannelService::serviceInfo ( ) const

Returns JSON Document contains JSON Schema Service Descriptor (https://jsonrpc.org/historical/json-schema-service-descriptor.html)

Returns
const QJsonObject&

◆ dispatch()

QJsonChannelMessage QJsonChannelService::dispatch ( const QJsonChannelMessage request) const

Process a JSON-RPC message. In general it means the invocation of a requested function.

Parameters
messageJSON-RPC message
Returns
QJsonChannelMessage JSON-RPC response message

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