The main entity of QJsonChannel represents service repository and provides API for a JSON-RPC method invokation.
More...
#include <QJsonChannelServiceRepository.h>
The main entity of QJsonChannel represents service repository and provides API for a JSON-RPC method invokation.
Definition at line 15 of file QJsonChannelServiceRepository.h.
◆ QJsonChannelServiceRepository()
| QJsonChannelServiceRepository::QJsonChannelServiceRepository |
( |
| ) |
|
◆ ~QJsonChannelServiceRepository()
| QJsonChannelServiceRepository::~QJsonChannelServiceRepository |
( |
| ) |
|
◆ addService() [1/2]
| bool QJsonChannelServiceRepository::addService |
( |
const QSharedPointer< QJsonChannelService > & |
service | ) |
|
Adds service to the repository.
- Parameters
-
| service | A service to attach to the repository |
- Returns
- true in case the sevice was added
-
false in case of failure
◆ addService() [2/2]
| bool QJsonChannelServiceRepository::addService |
( |
const QByteArray & |
name, |
|
|
const QByteArray & |
version, |
|
|
const QByteArray & |
description, |
|
|
QSharedPointer< QObject > |
obj |
|
) |
| |
Adds service to the repository.
- Parameters
-
| name | Service name |
| version | Service version |
| description | Service description |
| obj | Service object |
- Returns
- true In case the sevice was added
-
false In case of failure
◆ addThreadSafeService()
| bool QJsonChannelServiceRepository::addThreadSafeService |
( |
const QByteArray & |
name, |
|
|
const QByteArray & |
version, |
|
|
const QByteArray & |
description, |
|
|
QSharedPointer< QObject > |
obj |
|
) |
| |
Adds thread-safe service to the repository. Service will be not locker during the methods invocation.
- Parameters
-
| name | Service name |
| version | Service version |
| description | Service description |
| obj | Service object |
- Returns
- true In case the sevice was added
-
false In case of failure
◆ getService()
| QSharedPointer<QJsonChannelService> QJsonChannelServiceRepository::getService |
( |
const QByteArray & |
serviceName | ) |
|
Return service by name.
- Parameters
-
| serviceName | a service name to search |
- Returns
- QSharedPointer <QJsonChannelService> a found sevice
◆ getServiceObject()
| QSharedPointer<QObject> QJsonChannelServiceRepository::getServiceObject |
( |
const QByteArray & |
serviceName | ) |
|
Return service object by name.
- Parameters
-
| serviceName | a service name to search |
- Returns
- QSharedPointer<QObject> a found sevice
◆ removeService()
| bool QJsonChannelServiceRepository::removeService |
( |
const QByteArray & |
serviceName | ) |
|
Removes service from the repository.
- Parameters
-
| serviceName | A service name to remove from the repository |
- Returns
- true in case the sevice was removed
-
false in case of failure
◆ processMessage()
Process a JSON-RPC message. In general it means the invocation of a requested function of a requested service.
- Parameters
-
- Returns
- QJsonChannelMessage JSON-RPC response message
The documentation for this class was generated from the following file: